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.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_v5/kexec-tools/kexe...
patches: http://khibernation.sourceforge.net/download/release_v5/kexec-tools/kexe...
binary: http://khibernation.sourceforge.net/download/release_v5/kexec-tools/kexe...2. Memory image saving tool. Currently, the memory image saving is
done through: "cp /proc/vmcore <image file>". This will save all
memory pages of original kernel including the free pages. Maybe the
crash dump tool "makedumpfile" can be used for this, but it has not
been tested.3. Memory image restore to...
Why is a third kernel needed? Why can't kernel B be used for this as
well? In fact, if kernel A has been compiled to be relocatable and
crash dump enabled, why wouldn't it suffice for all 3 instances?-
The memory area of kernel B is excluded from the elf header of
One kernel can be used for three situation. In fact, I use just one
kernel for testing.Best Regards,
Huang Ying
-
you could use one kernel for all three, or you could use three different
kernels, and three different sets of userspace if it's appropriate.David Lang
-
This isn't true as long as we have not changed the handling of devices
Well, maybe.
Greetings,
Rafael
-
I will add detail description about this. It is possible with TuxOnIce,
I know it has not been implemented yet. I just say that it is possible
Best Regards,
Huang Ying
-
When that's implemented, it may be possible to avoid using the freezer for
u/swsusp and TuxOnIce either. Time will tell.Greetings,
Rafael
-
| david | Re: Dual-Licensing Linux Kernel with GPL V2 and GPL V3 |
| Greg Kroah-Hartman | [PATCH 005/196] Chinese: add translation of SubmittingDrivers |
| Vladislav Bolkhovitin | Re: Integration of SCST in the mainstream Linux kernel |
| Jan Engelhardt | intel iommu (Re: -mm merge plans for 2.6.23) |
git: | |
| David Miller | [GIT]: Networking |
| David Miller | Re: [PATCH] pkt_sched: Destroy gen estimators under rtnl_lock(). |
| Gerrit Renker | [PATCH 27/37] dccp: Integration of dynamic feature activation - part 2 (server side) |
| Natalie Protasevich | [BUG] New Kernel Bugs |
