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/