> On Thursday, 12 July 2007 08:43,
david@lang.hm wrote:
>> On Wed, 11 Jul 2007, Jeremy Fitzhardinge wrote:
>>
>>> Andrew Morton wrote:
>>>> On Wed, 11 Jul 2007 15:30:31 +0000
>>>> "Huang, Ying" <ying.huang@intel.com> wrote:
>>>>
>>>>> 1. Boot a kernel A
>>>>> 2. Work under kernel A
>>>>> 3. Kexec another kernel B in kernel A
>>>>> 4. Work under kernel B
>>>>> 5. Jump from kernel B to kernel A
>>>>> 6. Continue work under kernel A
>>>>>
>>>>> This is the first step to implement kexec based hibernation. If the
>>>>> memory image of kernel A is written to or read from a permanent media
>>>>> in step 4, a preliminary version of kexec based hibernation can be
>>>>> implemented.
>>>>>
>>>>> The kernel B is run as a crashdump kernel in reserved memory
>>>>> region. This is the biggest constrains of the patch. It is planed to
>>>>> be eliminated in the next version. That is, instead of reserving memory
>>>>> region previously, the needed memory region is backuped before kexec
>>>>> and restored after jumping back.
>>>>>
>>>>> Another constrains of the patch is that the CONFIG_ACPI must be turned
>>>>> off to make kexec jump work. Because ACPI will put devices into low
>>>>> power state, the kexeced kernel can not be booted properly under
>>>>> it. This constrains can be eliminated by separating the suspend method
>>>>> and hibernation method of the devices as proposed earlier in the LKML.
>>>>>
>>>>> The kexec jump is implemented in the framework of software suspend. In
>>>>> fact, the kexec based hibernation can be seen as just implementing the
>>>>> image writing and reading method of software suspend with a kexeced
>>>>> Linux kernel.
>>>>>
>>>
>>> I guess I'm (still) confused by the terminology here. Do you mean that it
>>> fits into suspend-to-disk as a disk-writing mechanism, or in suspend-to-ram
>>> as a way of going to sleep?
>>
>> Suspend-to-ram involves stopping the system and shutting down devices to
>> go into low-power mode, then on wakeup restarting devices and resuming
>> operation
>>
>> so the steps would be.
>>
>> 1. stop userspace
>>
>> 2. walk the system device tree and put devices to sleep
>>
>> 3. go into the lowest power mode available and wait for a wakeup signal
>>
>> later
>>
>> 4. walk the system device tree and wake up devices
>>
>> 5. resume userspace scheduling.
>
> Note that we are going to phase out steps 1 and 5.