From: "Rafael J. Wysocki" <rjw@sisk.pl>
To: Pavel Machek <pavel@ucw.cz>
Cc: LKML <linux-kernel@vger.kernel.org>,
ACPI Devel Maling List <linux-acpi@vger.kernel.org>,
pm list <linux-pm@lists.linux-foundation.org>,
Alexey Starikovskiy <astarikovskiy@suse.de>
Subject: Re: [RFC][PATCH 1/3] PM: Introduce new top level suspend and hibernation callbacks
Date: Wed, 19 Mar 2008 02:04:06 +0100 [thread overview]
Message-ID: <200803190204.07592.rjw@sisk.pl> (raw)
In-Reply-To: <20080318235457.GA1936@elf.ucw.cz>
On Wednesday, 19 of March 2008, Pavel Machek wrote:
> Hi!
Hi,
> > > So... we do prepare() but it detects new child, so it returns -EAGAIN.
> > > so we call complete() based on description above
> > > ...and then we call prepare() to suspend again?
> >
> > You misunderstood (maybe the comment needs to be clarified as above).
>
> Yes, please :-).
>
> > If prepare() returns any error (including -EAGAIN) then complete() does
> > not get called. If prepare() returns successfully but the PM core
> > detects that a new child was added while prepare() was running, then we
> > call complete(), suspend the child, and call prepare() again.
>
> Ok.
>
> > > > + * @suspend: Executed before putting the system into a sleep state in which the
> > > > + * contents of main memory are preserved. Quiesce the device, put it into
> > >
> > > content....is?
> >
> > It's okay to use "contents" -- analogous to the table of contents in a
> > book. It's one of those weird corner cases where either alternative is
> > acceptable.
>
> Ok -- I guess I should get that english course ;-).
Thanks for the comments.
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.
Next, he wants the number of noirq callbacks to be reduced.
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.
Thanks,
Rafael
next prev parent reply other threads:[~2008-03-19 1:04 UTC|newest]
Thread overview: 26+ messages / expand[flat|nested] mbox.gz Atom feed top
2008-03-16 23:20 [RFC][PATCH 0/3] PM: Rework suspend and hibernation code for devices Rafael J. Wysocki
2008-03-16 23:22 ` [RFC][PATCH 1/3] PM: Introduce new top level suspend and hibernation callbacks Rafael J. Wysocki
2008-03-18 10:01 ` Pavel Machek
2008-03-18 15:10 ` Alan Stern
2008-03-18 23:54 ` Pavel Machek
2008-03-19 1:04 ` Rafael J. Wysocki [this message]
2008-03-19 2:44 ` Alan Stern
2008-03-19 3:49 ` Benjamin Herrenschmidt
2008-03-19 15:19 ` Alan Stern
2008-03-20 3:33 ` Benjamin Herrenschmidt
2008-03-20 14:45 ` Alan Stern
2008-03-20 22:32 ` Benjamin Herrenschmidt
2008-03-20 18:26 ` Alan Stern
2008-03-20 22:34 ` Benjamin Herrenschmidt
2008-03-20 22:57 ` Alan Stern
2008-03-19 0:53 ` Greg KH
2008-03-19 9:15 ` Pavel Machek
2008-03-19 13:22 ` Rafael J. Wysocki
2008-03-19 18:07 ` Greg KH
2008-03-16 23:24 ` [RFC][PATCH 2/3] PM: New suspend and hibernation callbacks for platform bus type Rafael J. Wysocki
2008-03-18 10:02 ` Pavel Machek
2008-03-16 23:25 ` [RFC][PATCH 3/3] PM: New suspend and hibernation callbacks for PCI " Rafael J. Wysocki
2008-03-18 10:02 ` Pavel Machek
2008-03-19 0:55 ` Greg KH
2008-03-19 13:24 ` Rafael J. Wysocki
2008-03-19 18:06 ` Greg KH
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=200803190204.07592.rjw@sisk.pl \
--to=rjw@sisk.pl \
--cc=astarikovskiy@suse.de \
--cc=linux-acpi@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-pm@lists.linux-foundation.org \
--cc=pavel@ucw.cz \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox