Kexec base hibernation has some potential advantages over uswsusp and
TuxOnIce (suspend2). Some most obvious advantages are:1. The hibernation image size can exceed half of memory size easily.
2. The hibernation image can be written to and read from almost
anywhere, such as USB disk, NFS.3. It is possible to eliminate freezer from kexec based hibernation
implementation.4. Based on kexec/kdump implementation, the kernel code needed is
less.This patch set implements the kexec based hibernation. The kernel
functionality added are as follow:1. Jumping between the kexeced kernel and the original kernel. This is
used by hibernation to save/load necessary state in original kernel
and jumping back to original kernel after restore the memory of
original kernel.2. Add writing support to /dev/oldmem. This is used by hibernation to
restore the memory of original kernel.The hibernation procedure with the patch set is as follow:
1. Boot a kernel A
2. Work under kernel A
3. Kexec another kernel B (crash dump enabled) in kernel A.
4. Save the memory image of kernel A through crash dump (such as "cp
/proc/vmcore ~"). Save the "jump back entry".5. Shutdown or reboot
The restore process with the patch set is as follow:
1. Boot a kernel C (crash dump enabled), the memory area used by
kernel C must be a subset of memory area used by kernel B.2. Restore the memory image of kernel A through /dev/oldmem. Restore
the "jump back entry".3. Jump from kernel C back to kernel A
4. Continue work under kernel A
The following user-space tools are needed to implement hibernation and
restore.1. kexec-tools needs to be patched to support kexec jump. The patches
and the precompiled kexec can be download from the following URL:
source: http://khibernation.sourceforge.net/download/release_20070920/kexec-tool...
patches: [ message continues ]
This steps replaces kernel C's pages with kernel B's (at least 15m-16m),
saved at step 8, so these kernels should be equal? Or they must be
physically located in non-overlapping regions such that C is in B's
memory range but non-overlapping. The proposed setup doesn't guaratee
--Mika-
From a short glance over current Linus' arch/i386/kernel/machine_kexec.c,
memory for the crash dump kernel B still needs to be reserved statically when
booting A.This is one of the biggest issues with kexec based hibernation. For the
typical notebook user, it is totally unacceptable to reserve 16 megabytes of
memory just to be able to suspend to disk. And given the fact that current
distribution kernels are quite modular and require early module loading, even
more memory might be needed.IMHO, a plan how to fix this must exist or the concept of kexec based
hibernation is a waste of time.Stefan
-
This issue has been resolved. The implementation method details in
another mail with title as follow:[RFC][PATCH 1/2 -mm] kexec based hibernation -v3: kexec jump
Best Regards,
Huang Ying
-
| Ingo Molnar | [patch 02/13] syslets: add syslet.h include file, user API/ABI definitions |
| Heiko Carstens | Re: 2.6.25-rc6-git6: Reported regressions from 2.6.24 |
| Greg Kroah-Hartman | [PATCH 010/196] Chinese: add translation of Codingstyle |
| Rafael J. Wysocki | [Bug #10629] 2.6.26-rc1-$sha1: RIP __d_lookup+0x8c/0x160 |
git: | |
| Gerrit Renker | [PATCH 0/37] dccp: Feature negotiation - last call for comments |
| Linus Torvalds | Re: [GIT]: Networking |
| Mark Lord | Re: [BUG] New Kernel Bugs |
| Jarek Poplawski | [PATCH] pkt_sched: Destroy gen estimators under rtnl_lock(). |
