LWN.net Logo

Ksplice: kernel patches without reboots

Ksplice: kernel patches without reboots

Posted Apr 30, 2008 6:41 UTC (Wed) by NAR (subscriber, #1313)
Parent article: Ksplice: kernel patches without reboots

Well, erlang has this feature since the middle of 90s, so that's a prior art too...


(Log in to post comments)

Ksplice: kernel patches without reboots

Posted Apr 30, 2008 7:40 UTC (Wed) by jamesh (subscriber, #1159) [Link]

Python's reload() builtin might also be covered by the patent too.  If that is considered too
simple, some of the "super reload" modules that try harder to replace references to the old
code might be covered.

Ksplice: kernel patches without reboots

Posted May 1, 2008 0:48 UTC (Thu) by flewellyn (subscriber, #5047) [Link]

And various Lisp systems had it in the 1970s, so there's a great deal more prior art there.

Ksplice: kernel patches without reboots

Posted May 8, 2008 14:09 UTC (Thu) by forthy (guest, #1525) [Link]

Interactive programming languages typically have this feature, i.e. Lisp, Smalltalk, and to some extent Forth (Forth usually does not change old functions when you redefine one, but it's often possible to patch whatever old function to point to a newer one if you like to). You just reload your source.

This is only so tricky, because Linux is written in C, a language that has no intention to generate, replace, or modify code at run-time (it's a classical batch-oriented edit-compile-link-go language). Therefore, the programmers have no idea how to do that properly - it's fairly trivial if done right, but needs the support of the language. Changing e.g. GCC to add (on x86) a simple 5-byte noop in front of each function to be patched with a jmp to the replacement function would allow seamless patching of the kernel - you don't have to wait for the previous call to this function to complete, since the replacement is somewhere else, and all further callers of this function will call the replacement instead.

Ksplice: kernel patches without reboots

Posted May 8, 2008 19:55 UTC (Thu) by nix (subscriber, #2304) [Link]

How do you ensure that concurrent callers on other CPUs aren't located 
inside those five bytes?

Copyright © 2008, Eklektix, Inc.
Comments and public postings are copyrighted by their creators.
Linux is a registered trademark of Linus Torvalds