posted by Thom Holwerda on Wed 15th Jul 2009 16:09 UTC
IconOne of the problem with operating system updates is that you often need to reboot the system. While this is nothing but a minor nuisance for us desktop users, it's a bigger problem when it comes to servers. Ksplice is a technology that allows Linux kernel patches to be applied without actually restarting the kernel.

Ksplice is actually quite an intricate piece of technology, and since I'm simply not qualified enough to understand and explain it all, I'll leave it to Ars to explain:

To generate a live update, it compares compiled object code from before and after a source patch is applied, a technique that the developers refer to as "pre-post differencing." They take advantage of the -ffunction-sections and -fdata-sections options of the C compiler to eliminate some variance between the pre and post object code.

To determine where the symbols reside in memory, they use a method that they describe as run-pre matching, which compares the "pre" object code to the code that is running in memory. This is done with a special Ksplice kernel module. The live updates generated by Ksplice inject new functions into memory while the kernel is running and modify the old functions so that their path of execution will be redirected to the new versions.

The developers behind Ksplice claim that the process interrupts system operation for only 0.7 milliseconds, which is pretty impressive. Most kernel patches do not need to be adapted to work with Ksplice (88%, limited to x86), with the remainder (12%) needing 1-12 lines of code in order to work. The latter category consists of patches that perform semantic changes to kernel data structures.

Ksplice is not some vague proposal - it actually works right now, and you can test it out on Ubuntu via Ksplice Uptrack.

e p (2)    32 Comment(s)

Technology White Papers

See More