From: Zoltan Kiss <zoltan.kiss@linaro.org>
To: "Zhangleiqiang (Trump)" <zhangleiqiang@huawei.com>,
Wei Liu <wei.liu2@citrix.com>,
"xen-devel@lists.xen.org" <xen-devel@lists.xen.org>
Cc: "Xiaoding (B)" <xiaoding1@huawei.com>,
Zhuangyuxin <zhuangyuxin@huawei.com>,
zhangleiqiang <zhangleiqiang@gmail.com>,
"Luohao (brian)" <brian.luohao@huawei.com>,
"Yuzhou (C)" <vitas.yuzhou@huawei.com>
Subject: Re: Poor network performance between DomU with multiqueue support
Date: Thu, 04 Dec 2014 13:35:17 +0000 [thread overview]
Message-ID: <54806315.6010007@linaro.org> (raw)
In-Reply-To: <3A6795EA1206904E94BEC8EF9DF109AE2393371E@SZXEMA512-MBX.china.huawei.com>
On 04/12/14 12:09, 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 I understand, the RX process is as follows:
> 1. Phy NIC receive packet
> 2. XEN Hypervisor trigger interrupt to Dom0
> 3. Dom0' s NIC driver do the "RX" operation, and the packet is stored into SKB which is also owned/shared with netback
Not that easy. There is something between the NIC driver and netback
which directs the packets, e.g. the old bridge driver, ovs, or the IP
stack of the kernel.
> 4. NetBack notify netfront through event channel that a packet is receiving
> 5. Netfront grant a buffer for receiving and notify netback the GR (if using grant-resue mechanism, netfront just notify the GR to netback) through IO Ring
It looks a bit confusing in the code, but netfront put "requests" on the
ring buffer, which contains the grant ref of the guest page where the
backend can copy. When the packet comes, netback consumes these requests
and send back a response telling the guest the grant copy of the packet
finished, it can start handling the data. (sending a response means it's
placing a response in the ring and trigger the event channel)
And ideally netback should always have requests in the ring, so it
doesn't have to wait for the guest to fill it up.
> 6. NetBack do the grant_copy to copy packet from its SKB to the buffer referenced by GR, and notify netfront through event channel
> 7. Netfront copy the data from buffer to user-level app's SKB
Or wherever that SKB should go, yes. Like with any received packet on a
real network interface.
>
> Am I right? Why not using zero-copy transmit in guest RX data pash too ?
Because that means you are mapping that memory to the guest, and you
won't have any guarantee when the guest will release them. And netback
can't just unmap them forcibly after a timeout, because finding a
correct timeout value would be quite impossible.
A malicious/buggy/overloaded guest can hold on to Dom0 memory
indefinitely, but it even becomes worse if the memory came from another
guest: you can't shutdown that guest for example, until all its memory
is returned to him.
Regards,
Zoli
next prev parent reply other threads:[~2014-12-04 13:35 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 [this message]
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
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=54806315.6010007@linaro.org \
--to=zoltan.kiss@linaro.org \
--cc=brian.luohao@huawei.com \
--cc=vitas.yuzhou@huawei.com \
--cc=wei.liu2@citrix.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.