From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1759630AbZBCAWH (ORCPT ); Mon, 2 Feb 2009 19:22:07 -0500 Received: (majordomo@vger.kernel.org) by vger.kernel.org id S1758224AbZBCAVm (ORCPT ); Mon, 2 Feb 2009 19:21:42 -0500 Received: from smtp1.linux-foundation.org ([140.211.169.13]:38062 "EHLO smtp1.linux-foundation.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1759765AbZBCAVl (ORCPT ); Mon, 2 Feb 2009 19:21:41 -0500 Date: Mon, 2 Feb 2009 16:21:20 -0800 (PST) From: Linus Torvalds X-X-Sender: torvalds@localhost.localdomain To: Benjamin Herrenschmidt cc: "Rafael J. Wysocki" , Linux Kernel Mailing List , Jesse Barnes , Andreas Schwab , Len Brown , Ingo Molnar Subject: Re: PCI PM: Restore standard config registers of all devices early In-Reply-To: <1233619881.18767.131.camel@pasglop> Message-ID: References: <200901261904.n0QJ4Q9c016709@hera.kernel.org> <200902022333.51017.rjw@sisk.pl> <200902022356.33094.rjw@sisk.pl> <1233619881.18767.131.camel@pasglop> User-Agent: Alpine 2.00 (LFD 1167 2008-08-23) MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Tue, 3 Feb 2009, Benjamin Herrenschmidt wrote: > > > * Memory allocations with GFP_KERNEL are made, which is even worse, because > > we really shouldn't do that during suspend _at_ _all_, even during the regular > > ->suspend() with interrupts on, because there's not guarantee that swap will > > will be available at that time. So, for the sake of correctness, we should > > get rid of the GFP_KERNEL from the ACPI code paths executed during > > suspend-resume anyway. > > Well, as I said, this is a problem with more than just ACPI and again, I > don't think the fix is to be done in ACPI itself. The buddy and slab > should basically stick NOIO or ATOMIC to any allocation done after we > started suspending the system. We already do have magic code for things like PF_MEMALLOC (recursion), or TIF_MEMDIE (oom) or "(rt_task(p)) && !in_interrupt()" (give RT tasks higher priorities) in the page allocator. Having a special case for NOT_RUNNING wouldn't be _pretty_, but it certainly isn't totally unreasonable either. Linus