- To: "Justin Gibbs" <justing@xxxxxxxxxxxxxxxx>
- Subject: Re: [Xen-devel] [PATCH 0001/001] xen: multi page ring support for block devices
- From: "Jan Beulich" <JBeulich@xxxxxxxx>
- Date: Wed, 14 Mar 2012 15:34:16 +0000
- Cc: "jeremy@xxxxxxxx" <jeremy@xxxxxxxx>, Ian Campbell <Ian.Campbell@xxxxxxxxxx>, "netdev@xxxxxxxxxxxxxxx" <netdev@xxxxxxxxxxxxxxx>, "konrad.wilk@xxxxxxxxxx" <konrad.wilk@xxxxxxxxxx>, "waldi@xxxxxxxxxx" <waldi@xxxxxxxxxx>, "joe.jin@xxxxxxxxxx" <joe.jin@xxxxxxxxxx>, "weiyi.huang@xxxxxxxxx" <weiyi.huang@xxxxxxxxx>, "linux-kernel@xxxxxxxxxxxxxxx" <linux-kernel@xxxxxxxxxxxxxxx>, "jbarnes@xxxxxxxxxxxxxxxx" <jbarnes@xxxxxxxxxxxxxxxx>, "virtualization@xxxxxxxxxxxxxxxxxxxxxxxxxx" <virtualization@xxxxxxxxxxxxxxxxxxxxxxxxxx>, "paul.gortmaker@xxxxxxxxxxxxx" <paul.gortmaker@xxxxxxxxxxxxx>, Paul Durrant <Paul.Durrant@xxxxxxxxxx>, DavidVrabel <david.vrabel@xxxxxxxxxx>, Santosh Jodh <Santosh.Jodh@xxxxxxxxxx>, "linux-pci@xxxxxxxxxxxxxxx" <linux-pci@xxxxxxxxxxxxxxx>, "<konrad@xxxxxxxxxx>" <konrad@xxxxxxxxxx>, "akpm@xxxxxxxxxxxxxxxxxxxx" <akpm@xxxxxxxxxxxxxxxxxxxx>, "xen-devel@xxxxxxxxxxxxx" <xen-devel@xxxxxxxxxxxxx>, "lersek@xxxxxxxxxx" <lersek@xxxxxxxxxx>, "dgdegra@xxxxxxxxxxxxx" <dgdegra@xxxxxxxxxxxxx>
- Delivered-to: virtualization@xxxxxxxxxxxxxxxxxxxxxxxx
- In-reply-to: <230A793A-C929-468E-97BE-1C68920749E1@spectralogic.com>
>>> On 14.03.12 at 07:32, Justin Gibbs <justing@xxxxxxxxxxxxxxxx> wrote:
> There's another problem here that I brought up during the Xen
> Hack-a-thon. The ring macros require that the ring element count
> be a power of two. This doesn't mean that the ring will be a power
> of 2 pages in size. To illustrate this point, I modified the FreeBSD
> blkback driver to provide negotiated ring stats via sysctl.
>
> Here's a connection to a Windows VM running the Citrix PV drivers:
>
> dev.xbbd.2.max_requests: 128
> dev.xbbd.2.max_request_segments: 11
> dev.xbbd.2.max_request_size: 45056
> dev.xbbd.2.ring_elem_size: 108 <= 32bit ABI
> dev.xbbd.2.ring_pages: 4
> dev.xbbd.2.ring_elements: 128
> dev.xbbd.2.ring_waste: 2496
>
> Over half a page is wasted when ring-page-order is 2. I'm sure you
> can see where this is going. :-)
Having looked a little closer on how the wasted space is progressing,
I find myself in the odd position that I can't explain the original (and
still active) definition of BLKIF_MAX_SEGMENTS_PER_REQUEST (11):
With ring-order zero, there's 0x240/0x1c0 bytes (32/64-bit
respectively) are unused. With 32 requests fitting in the ring, and with
each segment occupying 6 bytes (padded to 8), in the 64-bit variant
there's enough space for a 12th segment (32-bit would even have
space for a 13th). Am I missing anything here?
Plus all this assumes a page size of 4k, yet ia64 had always been using
pages of 16k iirc.
> Here are the limits published by our backend to the XenStore:
>
> max-ring-pages = "113"
> max-ring-page-order = "7"
> max-requests = "256"
> max-request-segments = "129"
> max-request-size = "524288"
Oh, so this protocol doesn't require ring-pages (and max-ring-pages)
to be a power of two? In which case I think it is a mistake to also
advertise max-ring-page-order, as at least the (Linux) frontend code
I know of interprets this as being able to set up a ring of (using the
numbers above) 128 pages (unless, of course, your backend can deal
with this regardless of the max-ring-pages value it announces).
Jan
_______________________________________________
Virtualization mailing list
Virtualization@xxxxxxxxxxxxxxxxxxxxxxxxxx
https://lists.linuxfoundation.org/mailman/listinfo/virtualization
[KVM Development]
[CentOS Virtualization]
[Netdev]
[Ethernet Bridging]
[Linux Wireless]
[Kernel Newbies]
[Security]
[Linux for Hams]
[Netfilter]
[Bugtraq]
[Photo]
[Yosemite]
[Yosemite Forum]
[MIPS Linux]
[ARM Linux]
[Linux RAID]
[Linux Admin]
[Samba]
[Find Someone Nice]
[Video 4 Linux]
[Linux Resources]