Geoffrey Lefebvre
2008-Nov-28 02:17 UTC
[Xen-devel] [PATCH] multi-page blkfront/blkback patch
Hi, Here is the refreshed version of the multi-page ring patch for blkfront and blkback. I currently don''t have time to refresh the blktap part of the patch. The patch should apply cleanly to the following changeset in the linux 2.6.18 tree: changeset: 752:0b859c9516ba tag: qparent parent: 751:6591b4869889 parent: 748:5012c470f875 user: Keir Fraser <keir.fraser@citrix.com> date: Wed Nov 26 11:13:49 2008 +0000 summary: Merge with ia64 tree. The patch adds support for 1,2 and 4 pages ring for block devices. The number of page is configured when compiling blkfront. The xenstore setup protocol is backward compatible in the sense that a patched blkback will support both patched and unpatched blkfront, and a patched blkfront will use the existing protocol when setting up a 1 page ring so that it works with existing dom0. A guest will fail at boot time if it tries to setup a multi-page ring with an unpatched dom0. The ring setup protocol is a bit crude and it would be much nicer if the number of ring pages could be configured more dynamically and if blkfront could adapt to block backend that don''t support multi-page ring (specially if you want to be able to migrate from a patched to an unpatched dom0). If someone is interested in implementing this feature, feel free to have a go at it. The refreshed version of the patch hasn''t been tested extensively but it seems to work well. I don''t have access to a setup that allows me to test if migration works but save/restore seems to work. I also don''t have access to a filer to reproduce the performance number but the patch did give a significant boost in throughput (from 60 to 100MB/sec) when we last tested it. I am sorry i currently don''t have much time to spend on this but hopefully this will be helpful. cheers, geoffrey _______________________________________________ Xen-devel mailing list Xen-devel@lists.xensource.com http://lists.xensource.com/xen-devel
Jan Beulich
2008-Nov-28 08:41 UTC
Re: [Xen-devel] [PATCH] multi-page blkfront/blkback patch
Some comments on infrastructural things, not the actual functionality:>+ config 1_PAGE >+ bool "1 page" >+ config 2_PAGE >+ bool "2 pages" >+ config 4_PAGE >+ bool "4 pages"These names are too generic. At least XEN_ (and perhaps also BLKFRONT or some such) should also appear in them.>-static int blkif_reqs = 64; >+static int blkif_reqs = 128;Is this really related to the functionality introduced here?>+ BUG_ON(BLK_NUM_RING_PAGES != 1 && >+ BLK_NUM_RING_PAGES != 2 && >+ BLK_NUM_RING_PAGES != 4);This should be BUILD_BUG_ON().>+#ifndef CONFIG_XEN_BLKDEV_NUM_RING_PAGES >+#error "CONFIG_XEN_BLKDEV_NUM_RING_PAGES undefined!" >+#endifThis won''t work when building unmodified_drivers - I''m not sure what value to default to here, though. But for compatibility it should probably be 1, and the unmodified drivers'' Kbuild could override it if desired. Jan _______________________________________________ Xen-devel mailing list Xen-devel@lists.xensource.com http://lists.xensource.com/xen-devel
Keir Fraser
2008-Nov-28 09:22 UTC
Re: [Xen-devel] [PATCH] multi-page blkfront/blkback patch
On 28/11/08 08:41, "Jan Beulich" <jbeulich@novell.com> wrote:>> +#ifndef CONFIG_XEN_BLKDEV_NUM_RING_PAGES >> +#error "CONFIG_XEN_BLKDEV_NUM_RING_PAGES undefined!" >> +#endif > > This won''t work when building unmodified_drivers - I''m not sure what value > to default to here, though. But for compatibility it should probably be 1, > and the unmodified drivers'' Kbuild could override it if desired.It should be a module parameter anyway. I don''t think there''s anything particularly hard about choosing ring size at run time rather than build time. -- Keir _______________________________________________ Xen-devel mailing list Xen-devel@lists.xensource.com http://lists.xensource.com/xen-devel
Samvel Yuri
2008-Dec-01 06:49 UTC
[Xen-devel] Re: [PATCH] multi-page blkfront/blkback patch
Thank you very much Geoffrey for sharing blkfront/blkback changes. Regards, Sam ________________________________ From: Geoffrey Lefebvre <geoffrey@cs.ubc.ca> To: Samvel Yuri <samvelox@yahoo.com> Cc: Dutch Meyer <dmeyer@cs.ubc.ca>; Samuel Thibault <samuel.thibault@ens-lyon.org>; xen-devel <xen-devel@lists.xensource.com>; Andrew Warfield <andy@cs.ubc.ca> Sent: Thursday, November 27, 2008 6:17:58 PM Subject: [PATCH] multi-page blkfront/blkback patch Hi, Here is the refreshed version of the multi-page ring patch for blkfront and blkback. I currently don''t have time to refresh the blktap part of the patch. The patch should apply cleanly to the following changeset in the linux 2.6.18 tree: changeset: 752:0b859c9516ba tag: qparent parent: 751:6591b4869889 parent: 748:5012c470f875 user: Keir Fraser <keir.fraser@citrix.com> date: Wed Nov 26 11:13:49 2008 +0000 summary: Merge with ia64 tree. The patch adds support for 1,2 and 4 pages ring for block devices. The number of page is configured when compiling blkfront. The xenstore setup protocol is backward compatible in the sense that a patched blkback will support both patched and unpatched blkfront, and a patched blkfront will use the existing protocol when setting up a 1 page ring so that it works with existing dom0. A guest will fail at boot time if it tries to setup a multi-page ring with an unpatched dom0. The ring setup protocol is a bit crude and it would be much nicer if the number of ring pages could be configured more dynamically and if blkfront could adapt to block backend that don''t support multi-page ring (specially if you want to be able to migrate from a patched to an unpatched dom0). If someone is interested in implementing this feature, feel free to have a go at it. The refreshed version of the patch hasn''t been tested extensively but it seems to work well. I don''t have access to a setup that allows me to test if migration works but save/restore seems to work. I also don''t have access to a filer to reproduce the performance number but the patch did give a significant boost in throughput (from 60 to 100MB/sec) when we last tested it. I am sorry i currently don''t have much time to spend on this but hopefully this will be helpful. cheers, geoffrey _______________________________________________ Xen-devel mailing list Xen-devel@lists.xensource.com http://lists.xensource.com/xen-devel