Re: 2.1.125 Show stopper list: Draft

Matthias Urlichs (smurf@noris.de)
15 Oct 1998 21:44:36 +0200


Stephen Frost <sfrost@mail.snowman.net> writes:
> On Wed, 14 Oct 1998, Alex Buell wrote:
> >
> > Wasn't there an idea mentioned in the l-k mailing list a few months ago
> > where one could load a new kernel in place of the kernel whilst the system
> > is still up and running? What became of that?
> >
> This would be something I would consider very worth-while, if it is
> possible. I'm no where near a good enough coder (yet?) to be able to write
> this myself, but a thought would be to have a simple boot-strap that held
> everything still while the change was done.

Hmmm...
- load a module into the old kernel which can read a lot of internal data
structures from the current kernel into a buffer, and all driver setup,
and and and ...
- load the new kernel, with a module which imports the data from the buffer,
someplace into memory
- load swapover code into memory, tell it where the new kernel's pages are
- SIGSTOP all processes, including init
- tell all drivers that now is a good time to suspend themselves
- the swapover code gets the data from the old kernel, unmaps it, maps the
new kernel in (or copies the new kernel on top of the old, assuming a
remap doesn't work and the new kernel isn't bigger), and initializes it
with the buffered data, which also "re"starts the new drivers
- SIGCONT every process (OK, exclude those which were stopped anyway)
- pray

This looks certainly doable, give or take a lot of handwaving, but I'd say
we spend our effort on making the kernel 100% bug free so that it doesn't
have to be replaced in the first place.

-- 
Matthias Urlichs  |  noris network GmbH   |   smurf@noris.de  |  ICQ: 20193661
The quote was selected randomly. Really.    |      http://www.noris.de/~smurf/
-- 
I waited and waited, and when nobody called, I knew it was from you.

- To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majordomo@vger.rutgers.edu Please read the FAQ at http://www.tux.org/lkml/