Linked by Thom Holwerda on Thu 16th Oct 2008 22:08 UTC, submitted by diegocg
Linux Kexec is a feature that allows to boot kernels from a working kernel. It was originally intended for use by kernel and system developers who had to reboot several times a day. Soon, system administrators for high-availability servers found use for it as well. As systems get more and more advanced, and boot times get longer, end users can now benefit from it.
Permalink for comment 334039
To read all comments associated with this story, please click here.
TemporalBeing
Member since:
2007-08-22

That's the big speedup; the actual kernel initialisation time isn't any faster when rebooting with kexec, right?


Not sure how Linux does it - haven't looked at the source at all - but it could theoretically be faster than a normal boot operation. How?

Well, basically the various parts of the system would have to load the new kernel, temporarily halt (perhaps the processors System-Maintenance Mode?), serialize the states of everything in a special manner, start the new kernel with the serialized data, the deserialize everything and continue. You don't even have to necessarily stop all the hardware - just pause the I/O between the serialization/deserialization steps.

So while boot may take 5 seconds - and you have to go through POST, do all kinds of initialization, etc. - kexec() style rebooting could very well be under 1 second since you skip the whole POST step, and you can even skip most of the initialization steps if you serialize/deserialize correctly.

Of course, you have to have two kernels that understand the same serialization structures. So it would have to be versioned and you would have to have some way to fall back to the old kernel in case the new one had a problem in the deserialization.

Reply Parent Bookmark Score: 1