Re: [PATCH]: In kernel hibernation, suspend to both
From: Srivatsa S. Bhat
Date: Sun May 13 2012 - 19:34:13 EST
On 05/09/2012 04:41 PM, Bojan Smojver wrote:
> Bojan Smojver <bojan@xxxxxxxxxxxxx> 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
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.
Srivatsa S. Bhat
IBM Linux Technology Center
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/