[lkml]   [2007]   [Jul]   [17]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
Messages in this thread
SubjectRe: Hibernation considerations
On Mon, 16 Jul 2007, Al Boldi wrote:

> wrote:
>> On Mon, 16 Jul 2007, Al Boldi wrote:
>>> wrote:
>>>> suspend-to-RAM should not involve kexec, the only reason for doing the
>>>> kexec to to get a seperate userspace to use for suspend-to-disk
>>>> operations instead of trying to partially freeze the sustem and keep
>>>> useing it.
>>> Or you could do suspend-to-disk-and-RAM. But in the above case, it was
>>> meant to test kexec compatibility with device suspend/resume calls.
>> the point I am trying to make here is that there is no reason that the
>> kexec approach needs to do _any_ suspend/resume calls.
> When you go through ACPI, then that implies calling suspend/resume calls.

then don't go through ACPI

>> all that is needed is the ability of the new kernel to initialize the
>> devices it needs.
> We have to go through ACPI, for wakeup functions to succeed. A simple
> power-off won't do.

the kexec switch being posted requires ACPI be disabled, so it's clearly
possible to switch kernels and initialize devices without ACPI

>> suspend-to-disk-and-ram could be implemented as three
>> seperate steps
>> 1. suspend-to-disk
>> 2. resume-from-disk
>> 3. suspend-to-ram
>> followed by either
>> 4. resume-from-ram
>> or
>> 4. battery dies and loptop powers off completely
>> 5. power-on boot.
>> 6. resume-from-disk
>> all that you need to do is to make sure that the system doesn't run
>> anything that would affect permanent media or the outside world between
>> steps #2 and #3
> Exactly, which is why your scheme would break down on #3, and that's why you
> need to call S3 from within the kexec'd hibernation kernel after saving the
> hibernation image.

when a kexec is called, how does the kernel know what to execute?
something needs to tell it what to do, and I think that something is
either something in the kexec image, or it's something passed as a
parameter to that image.

all that would be needed to do #3 safely is to have the kernel that you
restarted on #2 do a suspend-to-ram before it does anything else.

David Lang
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to
More majordomo info at
Please read the FAQ at

 \ /
  Last update: 2007-07-17 06:47    [W:0.165 / U:13.668 seconds]
©2003-2018 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site