[K42-discussion] Linux Dynamic Upgrade

Andrew Baumann andrewb at cse.unsw.edu.au
Wed Oct 4 16:29:10 EST 2006


On Wednesday 04 October 2006 06:17, Will Schmidt wrote:
> On Tue, 2006-03-10 at 14:36 +1000, Andrew Baumann wrote:
> > That's one scenario, but it is also worthwhile keeping in mind that one
> > thing you can do with this approach that you can't with hot patching
> > (DKM, kprobes, etc.) is what it was originally designed for in K42:
> > hot-swapping. Because you change the functions only for a specific
> > instance of a module (eg. a single loopback filesystem, rather than all
> > loopback filesystems), you can do interesting adaptation and optimisation
> > by swapping to a different implementation on the fly.
>
> Hmm, this I hadnt quite thought of..  There may actually be better
> response to a example of this than to a demo against loopback.   Any
> thoughts on what would be a good candidate for that?

Well, the classic K42 example was changing caching and readahead policies for 
a specific file, but that probably wouldn't work in Linux because (I assume, 
correct me if I'm wrong) these are implemented at a higher level to the 
filesystem code and aren't loadable modules.

I've scanned through the list of modules that linux provides, and we are a bit 
limited in terms of hot-swapping, because most of the interesting things to 
hot-swap aren't drivers and filesystems. However, here are some ideas that 
came to mind:
 * You might want to change the implementation of a netfilter nat or 
connection tracking algorithm without reloading the module, because that 
implies resetting all the existing connections.
 * Similarly in the network stack, you might swap between different packet 
scheduling algorithms (I'm not sure if the current tools allow this 
seamlessly already, they might).
 * With a file system, there are some different parameters and optimisations 
you may want to hot-swap to change. For example, CIFS has options like max 
pending requests, the number and size of network buffers in a pool. JFS 
allows you to adjust the number of threads, number of locks and blocks. At a 
simple level, we could hot-swap to change those options.
 * Same thing for device drivers, you might want to hot-swap your network 
driver to use more receive buffers, or to a totally different implementation 
that does polling. You might hot-swap a block driver to do more or less 
buffering, or do batching of transactions etc.

Andrew



More information about the K42-discussion mailing list