From: "Rafael J. Wysocki" <rjw@sisk.pl>
To: Bojan Smojver <bojan@rexursive.com>
Cc: "Srivatsa S. Bhat" <srivatsa.bhat@linux.vnet.ibm.com>,
Linux PM list <linux-pm@vger.kernel.org>,
linux-kernel@vger.kernel.org, bp@alien8.de
Subject: Re: [PATCH]: In kernel hibernation, suspend to both
Date: Sun, 13 May 2012 15:10:37 +0200 [thread overview]
Message-ID: <201205131510.37664.rjw@sisk.pl> (raw)
In-Reply-To: <8b0184d9-0c54-4f6e-b0b7-ce1b7d854b9e@email.android.com>
On Sunday, May 13, 2012, Bojan Smojver wrote:
> "Rafael J. Wysocki" <rjw@sisk.pl> wrote:
>
> >On Wednesday, May 09, 2012, Bojan Smojver wrote:
> >> On Wed, 2012-05-09 at 13:40 +0530, Srivatsa S. Bhat wrote:
> >> > > + error = suspend_devices_and_enter(PM_SUSPEND_MEM);
> >> >
> >> >
> >> > I can imagine running into a host of problems here, since the
> >suspend
> >> > sequence is not carried out fully, from the beginning.
> >> >
> >> > For example, this will skip sending out the PM_SUSPEND_PREPARE and
> >the
> >> > PM_POST_SUSPEND notifiers. Worse, we actually send out the
> >> > PM_HIBERNATION_PREPARE
> >> > and PM_POST_HIBERNATION notifiers and then do a suspend instead,
> >> > underneath!
> >> >
> >> > (Similar cases for the rest of the notifiers sent during suspend vs
> >> > hibernation).
> >> >
> >> > Don't we need to handle such things properly, in order to make
> >> > suspend-to-both
> >> > work reliably?
> >>
> >> Honest answer - I have absolutely no idea. I've seen the code of
> >> suspend-utils (i.e. user mode stuff) and it seems to me that it does
> >> exactly this. Could be wrong of course, just like many times before.
> >>
> >> Rafael?
> >
> >Sorry, that has fallen out of my radar somehow.
> >
> >Srivatsa is right, we should generally pay attention to those details.
> >
> >I think we should generally use a different "prepare" notification for
> >the
> >save-image-and-suspend case.
> >
> >Thanks,
> >Rafael
>
>
> OK, I will try to rework then, if that is the case.
>
> What I don't understand is this: should the hibernation fail for some reason,
> we would get the same hibernation code unwind that failure, right?
Yes, if the failure happens before we attempt to suspend.
> So, a suspend after the image write will be just one long "failure", after
> which hibernation code has to unwind again. No?
Hmm. Good question. It should be like this I think, although there may be
some corner cases lurking.
Thanks,
Rafael
next prev parent reply other threads:[~2012-05-13 13:05 UTC|newest]
Thread overview: 58+ messages / expand[flat|nested] mbox.gz Atom feed top
2012-05-08 22:22 Bojan Smojver
2012-05-09 8:10 ` Srivatsa S. Bhat
2012-05-09 10:49 ` Bojan Smojver
2012-05-09 11:11 ` Bojan Smojver
2012-05-13 23:32 ` Srivatsa S. Bhat
2012-05-14 1:02 ` Bojan Smojver
2012-05-14 2:25 ` Alan Stern
2012-05-14 2:37 ` Bojan Smojver
2012-05-14 2:46 ` Bojan Smojver
2012-05-14 2:58 ` Bojan Smojver
2012-05-14 7:45 ` Bojan Smojver
2012-05-14 11:11 ` Bojan Smojver
2012-05-14 11:47 ` Bojan Smojver
2012-05-14 23:59 ` Bojan Smojver
2012-05-15 14:26 ` Alan Stern
2012-05-15 14:35 ` Srivatsa S. Bhat
2012-05-15 17:42 ` Rafael J. Wysocki
2012-05-15 18:23 ` Srivatsa S. Bhat
2012-05-15 22:23 ` Bojan Smojver
2012-05-21 4:38 ` Bojan Smojver
2012-05-21 8:18 ` Borislav Petkov
2012-05-21 13:18 ` Rafael J. Wysocki
2012-05-21 21:43 ` Bojan Smojver
2012-05-21 21:53 ` Rafael J. Wysocki
2012-05-21 21:55 ` Bojan Smojver
2012-05-24 14:51 ` Borislav Petkov
2012-05-25 2:02 ` Bojan Smojver
2012-05-31 16:23 ` Borislav Petkov
2012-06-01 2:03 ` Bojan Smojver
2012-06-01 8:48 ` Borislav Petkov
2012-06-01 8:57 ` Bojan Smojver
2012-06-01 9:03 ` Borislav Petkov
2012-06-16 13:59 ` Rafael J. Wysocki
2012-06-16 17:39 ` Borislav Petkov
2012-06-16 19:17 ` Rafael J. Wysocki
2012-06-16 20:09 ` Bojan Smojver
2012-06-16 20:19 ` Alan Stern
2012-06-16 23:07 ` Borislav Petkov
2012-06-17 3:21 ` Bojan Smojver
2012-06-17 10:31 ` Borislav Petkov
2012-06-17 20:21 ` Rafael J. Wysocki
2012-06-18 0:33 ` Bojan Smojver
2012-06-18 12:32 ` Borislav Petkov
2012-06-18 20:29 ` Rafael J. Wysocki
2012-06-18 21:08 ` Bojan Smojver
2012-06-18 21:28 ` Rafael J. Wysocki
2012-06-19 2:09 ` Bojan Smojver
2012-06-19 14:21 ` Borislav Petkov
2012-06-19 14:32 ` Bojan Smojver
2012-06-19 20:23 ` Rafael J. Wysocki
2012-06-19 21:32 ` Bojan Smojver
2012-06-19 22:35 ` Bojan Smojver
2012-05-12 21:47 ` Rafael J. Wysocki
2012-05-13 1:37 ` Bojan Smojver
2012-05-13 13:10 ` Rafael J. Wysocki [this message]
2012-05-13 23:18 ` Bojan Smojver
2012-05-13 23:49 ` Srivatsa S. Bhat
2012-05-14 0:39 ` Bojan Smojver
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=201205131510.37664.rjw@sisk.pl \
--to=rjw@sisk.pl \
--cc=bojan@rexursive.com \
--cc=bp@alien8.de \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-pm@vger.kernel.org \
--cc=srivatsa.bhat@linux.vnet.ibm.com \
/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
all inboxes | Powered by JetHome®