[PATCH] kexec based hibernation: a prototype of kexec multi-stage load
Eric W. Biederman
ebiederm at xmission.com
Sat May 17 21:59:58 EDT 2008
Vivek Goyal <vgoyal at redhat.com> writes:
> To me this idea also looks good. So control flow will look something
> as follows?
> relocate_new kernel:
> if (!preserve_context)
> set registers to known state.
> jump to purgatory.
> goto jump-back-setup:
> - Color the stack.
> move $0xffffffff 0(%esp)
> - call %edx
> - If 0 (%esp) is not -1
> image->start = 0(%esp) //Re entry point of kernel B. Store it.
> We returned from BIOS call. Re-entry point has not changed
> Do nothing.
> - Continue to resume kernel A
That logic has more conditionals then I like but it may in
fact be reasonable. I don't have any fundamental objections
into making this a co-routine interface.
That said. I think immediately implementing a coroutine interface
is a premature optimization. Please let's work on call/return.
Then prototype the coroutine method of suspend to swap and see
how much time it saves us.
Honestly I will be surprised if time will be saved, as historically
at least the bottleneck in kernel startup time is initializing
hardware, and we need to essentially redo all of that initialization.
More information about the kexec