lkml.org 
[lkml]   [2012]   [May]   [13]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: [PATCH]: In kernel hibernation, suspend to both
On 05/09/2012 04:41 PM, Bojan Smojver wrote:

> Bojan Smojver <bojan@rexursive.com> wrote:
>
>> 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.
>
> What makes me think that this may not be that bad is the fact that

> post-resume, it will actually be hibernation code that will be unwinding

> things. So like this: prepare for hibernation, create image, suspend to

> memory


This is the point where your patch gets scary - Suspend is not carried out
in its fullest sense; instead you jump directly to suspend_devices_and_enter().
Luckily, most of the things that happen before this are common between
suspend and hibernation. However, one thing that really stands out is the
notifications: if you directly call suspend_devices_and_enter(), we end
up missing the PM_SUSPEND_PREPARE notifications.

And there is no guarantee that everybody implements the same thing for
both PM_SUSPEND_PREPARE and PM_HIBERNATION_PREPARE notifications. That is
the reason I don't think it is safe.

> (equivalent to hibernation failure of some kind, really), resume

>from memory, unwind from unsuccessful hibernation.
>
> No?
>


Regards,
Srivatsa S. Bhat
IBM Linux Technology Center



\
 
 \ /
  Last update: 2012-05-14 01:41    [W:0.215 / U:0.776 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site