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

Re: [Xen-devel] [RFC PATCH 04/13] xen-netback: implement RX persistent grants



On Fri, May 22, 2015 at 10:25:10AM +0000, Joao Martins wrote:
> 
> On 19 May 2015, at 17:32, Wei Liu <wei.liu2@xxxxxxxxxx> wrote:
> 
> > On Tue, May 12, 2015 at 07:18:28PM +0200, Joao Martins wrote:
> >> It starts by doing a lookup in the tree for a gref. If no persistent
> >> grant is found on the tree, it will do grant copy and prepare
> >> the grant maps. Finally valides the grant map and adds it to the tree.
> > 
> > validates?
> > 
> >> After mapped these grants can be pulled from the tree in the subsequent
> >> requests. If it's out of pages in the tree pool, it will fallback to
> >> grant copy.
> >> 
> > 
> > Again, this looks complicated. Why use combined scheme? I will do
> > detailed reviews after we're sure we need such scheme.
> When we don't have the gref in tree we need to map it and then copying
> afterwards into the newly mapped page (and this only happens once until
> the grant is in tree). My options here were to either do this explicitly,
> after we add the persistent grant in which we would need to save to
> dst/src address and len to copy. The other option is to reuse the grant
> copy (since it's only once until the grant is in the tree) and use memcpy
> in followings requests. Additionally I allow the fallback to grant copy in

Which approach were you using here? I looked at the code but couldn't
quite get which one you were getting at. I guess the first one?

> case the guest provides providing more grefs > max_grants.
> 
> Note that this is also the case for TX as well, with regard to grant
> copying the header. I was unsure about which one is the most correct way
> of doing it, but ultimately the latter involved a smaller codepath, and
> that's why I chose it. What do you think?
> 

Shorter is better. Easier to understand.

Wei.

_______________________________________________
Xen-devel mailing list
Xen-devel@xxxxxxxxxxxxx
http://lists.xen.org/xen-devel


 


Rackspace

Lists.xenproject.org is hosted with RackSpace, monitoring our
servers 24x7x365 and backed by RackSpace's Fanatical Support®.