Gerd Hoffmann
2006-Aug-14 15:17 UTC
[Xen-devel] [patch/rfc] xenbus and driver issues with kexec
Hi, There are a number of problems in xenbus and the paravirtualized drivers when it comes to kexec''ing a domU kernel. It''s not specific to kexec, but to handing over devices to someone else within the same domU. The same issues will come up when someone tries to combine mini-os and grub to build some kind of in-domain bootloader. Fundamental issue is that there is no way to cleanly shutdown the frontend/backend drivers without destroying the domain and the backend devices. The patch addresses some but not all of the problems arising from that. It also has some debug stuff left in and needs some more polishing before final submission. Here are the changes: (1) ballon: print unconditionally driver_pages in /proc/xen/balloon. (2) xenbus: unregister watches in xs_suspend() (3) blk/netback: allow Closing -> Initialising state transition. (4) blk/netfront: shutdown (but *not* destroy) devices when devices_shutdown is called, by jumping from Closing to Initialising state. (5) Some cleanups along the way. Not solved yet: The netfront driver leaks pages in case it is shutdown while the interface is active. Problem is that it can''t get back the rx buffers, the netback driver sits on them and doesn''t release them until it has some packet data to fill in. The patch adds a netif_release_rx_bufs() function, but it doesn''t work reliable, usually it gets back only a few pages. To reproduce this you don''t need to play with kexec. Just apply the balloon driver patch. Boot a domU with the new kernel. Configure the eth0 interface, "xm network-detach ...", "xm network-attach", repeat. Watch driver_pages grow in /proc/xen/balloon. cheers, Gerd PS: documentation and complete domU kexec patches are available from http://www.suse.de/~kraxel/xen/kexec.html -- Gerd Hoffmann <kraxel@suse.de> http://www.suse.de/~kraxel/julika-dora.jpeg _______________________________________________ Xen-devel mailing list Xen-devel@lists.xensource.com http://lists.xensource.com/xen-devel