Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1162828AbYCSXGb (ORCPT ); Wed, 19 Mar 2008 19:06:31 -0400 Received: (majordomo@vger.kernel.org) by vger.kernel.org id S935225AbYCSVb2 (ORCPT ); Wed, 19 Mar 2008 17:31:28 -0400 Received: from netrider.rowland.org ([192.131.102.5]:2264 "HELO netrider.rowland.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with SMTP id S932549AbYCSVb0 (ORCPT ); Wed, 19 Mar 2008 17:31:26 -0400 Date: Tue, 18 Mar 2008 22:44:44 -0400 (EDT) From: Alan Stern X-X-Sender: stern@netrider.rowland.org To: "Rafael J. Wysocki" cc: Pavel Machek , pm list , ACPI Devel Maling List , Greg KH , Len Brown , LKML , Alexey Starikovskiy , David Brownell , Benjamin Herrenschmidt Subject: Re: [RFC][PATCH 1/3] PM: Introduce new top level suspend and hibernation callbacks In-Reply-To: <200803190204.07592.rjw@sisk.pl> Message-ID: 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 Content-Length: 1690 Lines: 36 On Wed, 19 Mar 2008, Rafael J. Wysocki wrote: > In the meantime I had an IRC chat with Ben, who wanted a couple of quite > substantial changes to be made to this patch. > > First, Ben thinks that ->prepare() should be called in a separate loop for > all devices, before any of them is suspended, so that drivers can assume the > availability of the other devices during ->prepare() (for example, so that they > can use GFP_KERNEL memory allocations). Accordingly, ->complete() would > be called in a separate loop after calling ->resume() for all devices. In order to make this work, you would have to prevent new children from being registered starting from the time just after prepare() returns, rather than from the time just before suspend() is called. Nothing is wrong with that, but it requires a redesign of the new flags. (It's worth mentioning that drivers will want to have a flag that gets set just _before_ prepare() -- just _after_ is too late.) In the other direction, it ought to be okay to allow new children to be registered during resume(). There's no need to wait for complete(). > Next, he wants the number of noirq callbacks to be reduced. I agree. For example, there isn't much point in having prepare() and complete() entries for noirq. > Both of the above things make sense, so I'll rework the patch (or maybe even > all three patches) to implement them and we'll see how they will look like. Alan Stern -- To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/