Re: [PATCH] kexec based hibernation: a prototype of kexec multi-stage load
From: Eric W. Biederman
Date: Sat May 17 2008 - 22:11:09 EST
Vivek Goyal <vgoyal@xxxxxxxxxx> 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.
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/