[Nottingham] Microsoft forge ahead with new technology

Roger Light rogerlight at gmail.com
Wed Dec 7 12:08:06 GMT 2005


On 07/12/05, Michael Erskine <msemtd at yahoo.co.uk> wrote:
> On Tuesday 06 December 2005 17:49, Roger Light wrote:

> > Back on topic-ish, I think you mentioned replacing a running kernel
> > without rebooting in another thread. Have you done this successfully
> > then? Would you care to pass on your experiences? It's something I've
> > always intended to look at as being "cool", but have never got around
> > to.

[snip]

> I am rather interested in whether it is possible to somehow overload a running
> kernel though!

Having actually looked into it now, it seems there are plenty of
people that think it would be "cool", but nobody (in the know) that
thinks it is possible. Search for "Switching kernels without
rebooting?" if you want more info, but basically it's just too much
work for too little gain.

There is another solution coming along the way (introduced in 2.6.13),
although 2.6.14 still has it as EXPERIMENTAL, is kexec From kernel
config, Processor type and features->kexec system call:

"kexec is a system call that implements the ability to shutdown your
current kernel, and to start another kernel.  It is like a reboot but
it is indepedent of the system firmware.   And like a reboot you can
start any kernel with it, not just Linux."

So it doesn't replace the running kernel in situ, but does give you a
fast "reboot" as you don't have to wait for the bios or hardware
initialisation. That sounds good enough to me. I think I'll try it now
:)

(Numerous reboots later)

Kexec is almost disgusting easy to install (on Gentoo at least). I've
done some tests with and without kexec by finding the time it takes
from selecting reboot on the gdm login screen to the gds login screen
appearing again. I only did two reboots for each.

Without kexec: 1.45, 1.44
With kexec: 1.18, 1.18

Damn my slow dhcp!

Some caveats: "Without kexec" includes the 10s grub delay for choosing
a kernel. It also includes the init script which loads kexec. This
computer doesn't have any interesting hardware bits, so I would expect
the difference to be more marked in those machines that were more
exotic.

That's a saving of about 16s. For me, that's not really worth
bothering over considering the disadvantages - I have to edit a config
file if I want to boot into a different kernel, I can't dual boot
without shutting down and restarting and kexec is still considered
experimental.

Interesting stuff though.

Cheers,

Roger



More information about the Nottingham mailing list