[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] Re: [Xen-devel] [Xen-users] Grant reference batch transmission
On Wed, Mar 11, 2015 at 10:24:48, Ian Campbell wrote: > > I think this gives us two options for grant reference batch transmission: > > > > 1. Send the grant references via the ring buffer. > > This doesn't require any additional allocations, but means that if > > the number of grant references in the batch is greater than > > O(sizeof(ringbuffer) / sizeof(grant_ref_t)), cycling through the > > ring will be required. > > Correct. In fact it's a bit worse because the ring pointers steal a > bit of space out of the shared page. You might also find that in > practice you want an id in the request which is echoed back in the response > e.g. > to handle out of order completion (depends on your use case though), > which would increase sizeof(grant_ref_t) (which is really sizeof(my_req_t)). > > What sorts of batch sizes are you expecting to see in your use case? We need to share hundreds of MB, so (assuming a 4kB guest page size) the batch size can be thousands of grant references. > > 2. Allocate and share one or more "index" page(s) which hold the > > grant > references. > > This means that only a single grant_ref_t needs to be sent via the > > ring, but at the cost of allocating additional memory for the index. > > If multiple index pages are required, they could be chained together > > by appending to index page N a grant reference pointing to page N+1. > > There have been patches for both net and blk at various points which > implemented "multipage rings" in order to get around the limitation on > the number of requests/responses which can git in a single page. I'm > not sure what the status of those is (Roger, Wei?) but I would > assume/hope that they also included some improvements to the common > infrastructure to make it simpler to arrange for this. > > The other approach, which I believe is used by the blk protocol today, > is "indirect descriptors" where the ring request contains a gref which > references another page which can then be packed full of grant references. > That has the downside of one more map call per request (although these > can still be batched by the backend) but lets you pack a lot more "bandwidth" > into a single ring. The approach I was thinking about sounds similar to "indirect descriptors" - I'll have a closer look at the blk drivers. -- IMPORTANT NOTICE: The contents of this email and any attachments are confidential and may also be privileged. If you are not the intended recipient, please notify the sender immediately and do not disclose the contents to any other person, use it for any purpose, or store or copy the information in any medium. Thank you. ARM Limited, Registered office 110 Fulbourn Road, Cambridge CB1 9NJ, Registered in England & Wales, Company No: 2557590 ARM Holdings plc, Registered office 110 Fulbourn Road, Cambridge CB1 9NJ, Registered in England & Wales, Company No: 2548782 _______________________________________________ Xen-devel mailing list Xen-devel@xxxxxxxxxxxxx http://lists.xen.org/xen-devel
|
Lists.xenproject.org is hosted with RackSpace, monitoring our |