From: Wei Liu <wei.liu2@citrix.com>
To: "Zhangleiqiang (Trump)" <zhangleiqiang@huawei.com>
Cc: "Luohao (brian)" <brian.luohao@huawei.com>,
Wei Liu <wei.liu2@citrix.com>,
Zhuangyuxin <zhuangyuxin@huawei.com>,
zhangleiqiang <zhangleiqiang@gmail.com>,
"Yuzhou (C)" <vitas.yuzhou@huawei.com>,
"xen-devel@lists.xen.org" <xen-devel@lists.xen.org>,
"Xiaoding (B)" <xiaoding1@huawei.com>
Subject: Re: Poor network performance between DomU with multiqueue support
Date: Fri, 5 Dec 2014 12:42:33 +0000 [thread overview]
Message-ID: <20141205124233.GD31446@zion.uk.xensource.com> (raw)
In-Reply-To: <3A6795EA1206904E94BEC8EF9DF109AE23933CDA@SZXEMA512-MBX.china.huawei.com>
On Fri, Dec 05, 2014 at 01:17:16AM +0000, Zhangleiqiang (Trump) wrote:
[...]
> > I think that's expected, because guest RX data path still uses grant_copy while
> > guest TX uses grant_map to do zero-copy transmit.
>
> As far as I know, there are three main grant-related operations used in split device model: grant mapping, grant transfer and grant copy.
> Grant transfer has not used now, and grant mapping and grant transfer both involve "TLB" refresh work for hypervisor, am I right? Or only grant transfer has this overhead?
Transfer is not used so I can't tell. Grant unmap causes TLB flush.
I saw in an email the other day XenServer folks has some planned
improvement to avoid TLB flush in Xen to upstream in 4.6 window. I can't
speak for sure it will get upstreamed as I don't work on that.
> Does grant copy surely has more overhead than grant mapping?
>
At the very least the zero-copy TX path is faster than previous copying
path.
But speaking of the micro operation I'm not sure.
There was once persistent map prototype netback / netfront that
establishes a memory pool between FE and BE then use memcpy to copy
data. Unfortunately that prototype was not done right so the result was
not good.
> >From the code, I see that in TX, netback will do gnttab_batch_copy as well as gnttab_map_refs:
>
> <code> //netback.c:xenvif_tx_action
> xenvif_tx_build_gops(queue, budget, &nr_cops, &nr_mops);
>
> if (nr_cops == 0)
> return 0;
>
> gnttab_batch_copy(queue->tx_copy_ops, nr_cops);
> if (nr_mops != 0) {
> ret = gnttab_map_refs(queue->tx_map_ops,
> NULL,
> queue->pages_to_map,
> nr_mops);
> BUG_ON(ret);
> }
> </code>
>
The copy is for the packet header. Mapping is for packet data.
We need to copy header from guest so that it doesn't change under
netback's feet.
Wei.
next prev parent reply other threads:[~2014-12-05 12:42 UTC|newest]
Thread overview: 35+ messages / expand[flat|nested] mbox.gz Atom feed top
2014-12-02 8:30 Poor network performance between DomU with multiqueue support zhangleiqiang
2014-12-02 10:57 ` David Vrabel
2014-12-02 11:53 ` Zhangleiqiang (Trump)
2014-12-02 17:25 ` Zoltan Kiss
2014-12-02 11:01 ` Wei Liu
2014-12-02 11:50 ` Zhangleiqiang (Trump)
2014-12-02 12:11 ` Wei Liu
2014-12-02 14:46 ` Zhangleiqiang (Trump)
2014-12-02 15:58 ` Wei Liu
2014-12-03 14:43 ` Zhangleiqiang (Trump)
2014-12-04 10:50 ` Wei Liu
2014-12-04 12:09 ` Zhangleiqiang (Trump)
2014-12-04 13:05 ` Wei Liu
2014-12-04 14:37 ` Zhangleiqiang (Trump)
2014-12-04 13:35 ` Zoltan Kiss
2014-12-04 14:31 ` Zhangleiqiang (Trump)
2014-12-05 15:20 ` Zoltan Kiss
2014-12-05 18:27 ` Konrad Rzeszutek Wilk
2014-12-08 6:50 ` Zhangleiqiang (Trump)
2014-12-05 1:17 ` Zhangleiqiang (Trump)
2014-12-05 12:42 ` Wei Liu [this message]
2014-12-05 15:18 ` Zoltan Kiss
2014-12-08 6:44 ` Zhangleiqiang (Trump)
2014-12-08 10:13 ` Wei Liu
2014-12-08 13:08 ` Zhangleiqiang (Trump)
2014-12-08 13:55 ` Wei Liu
2014-12-09 2:51 ` Zhangleiqiang (Trump)
2014-12-09 10:05 ` Ian Campbell
2014-12-09 9:03 ` Zhangleiqiang (Trump)
[not found] <3A6795EA1206904E94BEC8EF9DF109AE239B35A9@SZXEMA512-MBX.china.huawei.com>
2015-02-27 9:21 ` openlui
2015-02-27 10:59 ` Wei Liu
2015-02-27 11:30 ` David Vrabel
2015-02-28 3:21 ` openlui
2015-02-28 2:45 ` openlui
2015-03-03 10:40 ` Wei Liu
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=20141205124233.GD31446@zion.uk.xensource.com \
--to=wei.liu2@citrix.com \
--cc=brian.luohao@huawei.com \
--cc=vitas.yuzhou@huawei.com \
--cc=xen-devel@lists.xen.org \
--cc=xiaoding1@huawei.com \
--cc=zhangleiqiang@gmail.com \
--cc=zhangleiqiang@huawei.com \
--cc=zhuangyuxin@huawei.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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.