qemu-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [Qemu-devel] [QA-virtio]:Why vring size is limited to 1024?


From: Avi Kivity
Subject: Re: [Qemu-devel] [QA-virtio]:Why vring size is limited to 1024?
Date: Wed, 08 Oct 2014 15:36:18 +0300
User-agent: Mozilla/5.0 (X11; Linux x86_64; rv:31.0) Gecko/20100101 Thunderbird/31.1.1


On 10/08/2014 03:28 PM, Avi Kivity wrote:
My old presentation from 2012 or so suggested something like this.
We don't need a 64 bit cookie I think - a small 16 bit one
should be enough.


A 16 bit cookie means you need an extra table to hold the real request pointers.

With a 64-bit cookie you can store a pointer to the skbuff or bio in the ring itself, and avoid the extra lookup.

The extra lookup isn't the end of the world, since doesn't cross core boundaries, but it's worth avoiding.


What you can do is have two types of descriptors: head and fragment

union desc {
    struct head {
         u16 nfrags
         u16 flags
         u64 cookie
    }
    struct frag {
         u64 paddr
         u16 flen
         u16 flags
    }
}

so now a request length is 12*(nfrags+1).

You can be evil and steal some bits from paddr/cookie, and have each descriptor 8 bytes long.

btw, I also recommend storing things like vnet_hdr in the ring itself, instead of out-of-line in memory. Maybe the ring should just transport bytes and let the upper layer decide how it's formatted.





reply via email to

[Prev in Thread] Current Thread [Next in Thread]