[lkml]   [2012]   [May]   [12]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
Messages in this thread
SubjectRe: [PATCH]: In kernel hibernation, suspend to both
"Rafael J. Wysocki" <> 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
>> > sequence is not carried out fully, from the beginning.
>> >
>> > For example, this will skip sending out the PM_SUSPEND_PREPARE and
>> > PM_POST_SUSPEND notifiers. Worse, we actually send out the
>> > 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
>save-image-and-suspend case.

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? So, a suspend after the image write will be just one long "failure", after which hibernation code has to unwind again. No?


 \ /
  Last update: 2012-05-13 04:21    [W:0.164 / U:4.616 seconds]
©2003-2018 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site