From: ANNIE LI <annie.li@oracle.com>
To: Ian Campbell <Ian.Campbell@citrix.com>
Cc: Roger Pau Monne <roger.pau@citrix.com>,
"xen-devel@lists.xensource.com" <xen-devel@lists.xensource.com>,
"netdev@vger.kernel.org" <netdev@vger.kernel.org>,
"konrad.wilk@oracle.com" <konrad.wilk@oracle.com>
Subject: Re: [Xen-devel] [PATCH 1/4] xen/netback: implements persistent grant with one page pool.
Date: Fri, 16 Nov 2012 19:34:46 +0800 [thread overview]
Message-ID: <50A624D6.2010905@oracle.com> (raw)
In-Reply-To: <1353058363.3499.171.camel@zakaz.uk.xensource.com>
On 2012-11-16 17:32, Ian Campbell wrote:
> On Fri, 2012-11-16 at 02:49 +0000, ANNIE LI wrote:
>>> Take a look at the following functions from blkback; foreach_grant,
>>> add_persistent_gnt and get_persistent_gnt. They are generic functions to
>>> deal with persistent grants.
>> Ok, thanks.
>> Or moving those functions into a separate common file?
> Please put them somewhere common.
Ok.
>>> This is highly inefficient, one of the points of using gnttab_set_map_op
>>> is that you can queue a bunch of grants, and then map them at the same
>>> time using gnttab_map_refs, but here you are using it to map a single
>>> grant at a time. You should instead see how much grants you need to map
>>> to complete the request and map them all at the same time.
>> Yes, it is inefficient here. But this is limited by current netback
>> implementation. Current netback is not per-VIF based(not like blkback
>> does). After combining persistent grant and non persistent grant
>> together, every vif request in the queue may/may not support persistent
>> grant. I have to judge whether every vif in the queue supports
>> persistent grant or not. If it support, memcpy is used, if not,
>> grantcopy is used.
> You could (and should) still batch all the grant copies into one
> hypercall, e.g. walk the list either doing memcpy or queuing up copyops
> as appropriate, then at the end if the queue is non-zero length issue
> the hypercall.
This still connects with netback per-VIF implementation.
> I'd expect this lack of batching here and in the other case I just
> spotted to have a detrimental affect on guests running with this patch
> but not using persistent grants. Did you benchmark that case?
I did some test before.
But I'd better to create more detailed result under in different case.
>> After making netback per-VIF works, this issue can be fixed.
> You've mentioned improvements which are conditional on this work a few
> times I think, perhaps it makes sense to make that change first?
Yes, I did consider to implement per-VIF first before persistent grant.
But thinking of it is part of wei's patch and combined with other
patches, and decided to implement it later. But making the change first
would make things more clear.
Thanks
Annie
> Ian.
>
>
> --
> To unsubscribe from this list: send the line "unsubscribe netdev" in
> the body of a message tomajordomo@vger.kernel.org
> More majordomo info athttp://vger.kernel.org/majordomo-info.html
next prev parent reply other threads:[~2012-11-16 11:34 UTC|newest]
Thread overview: 42+ messages / expand[flat|nested] mbox.gz Atom feed top
2012-11-15 7:03 [PATCH 0/4] Implement persistent grant in xen-netfront/netback Annie Li
2012-11-15 7:04 ` [PATCH 1/4] xen/netback: implements persistent grant with one page pool Annie Li
2012-11-15 9:10 ` Ian Campbell
2012-11-16 2:18 ` [Xen-devel] " ANNIE LI
2012-11-16 9:27 ` Ian Campbell
2012-11-16 9:55 ` ANNIE LI
2012-11-15 9:57 ` Roger Pau Monné
2012-11-16 2:49 ` ANNIE LI
2012-11-16 7:57 ` ANNIE LI
2012-11-16 9:32 ` Ian Campbell
2012-11-16 11:34 ` ANNIE LI [this message]
2012-11-15 7:04 ` [PATCH 2/4] xen/netback: Split one page pool into two(tx/rx) " Annie Li
2012-11-15 9:15 ` Ian Campbell
2012-11-16 3:10 ` ANNIE LI
2012-11-15 7:05 ` [PATCH 3/4] Xen/netfront: Implement persistent grant in netfront Annie Li
2012-11-15 10:52 ` [Xen-devel] " Roger Pau Monné
2012-11-16 5:22 ` ANNIE LI
2012-11-16 7:58 ` ANNIE LI
2012-11-15 7:05 ` [PATCH 4/4] fix code indent issue in xen-netfront Annie Li
2012-11-15 7:40 ` [PATCH 0/4] Implement persistent grant in xen-netfront/netback Pasi Kärkkäinen
2012-11-15 8:38 ` [Xen-devel] " ANNIE LI
2012-11-15 8:51 ` Ian Campbell
2012-11-15 9:02 ` ANNIE LI
2012-11-15 9:35 ` Wei Liu
2012-11-15 11:12 ` [Xen-devel] " ANNIE LI
2012-11-16 15:34 ` Konrad Rzeszutek Wilk
2012-11-15 10:56 ` Roger Pau Monné
2012-11-15 11:14 ` ANNIE LI
2012-11-15 11:15 ` Ian Campbell
2012-11-15 18:29 ` Konrad Rzeszutek Wilk
2012-11-15 19:11 ` Ian Campbell
2012-11-16 15:23 ` Konrad Rzeszutek Wilk
2012-11-16 15:21 ` Konrad Rzeszutek Wilk
2012-11-15 8:53 ` Ian Campbell
2012-11-15 11:14 ` ANNIE LI
2012-11-15 8:56 ` Ian Campbell
2012-11-15 11:14 ` [Xen-devel] " ANNIE LI
2012-11-16 9:57 ` Ian Campbell
2012-11-16 11:37 ` ANNIE LI
2012-11-16 11:46 ` Ian Campbell
2012-11-17 4:39 ` annie li
2012-11-16 15:18 ` Konrad Rzeszutek Wilk
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=50A624D6.2010905@oracle.com \
--to=annie.li@oracle.com \
--cc=Ian.Campbell@citrix.com \
--cc=konrad.wilk@oracle.com \
--cc=netdev@vger.kernel.org \
--cc=roger.pau@citrix.com \
--cc=xen-devel@lists.xensource.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).