From: "Xu, Qian Q" <qian.q.xu@intel.com>
To: "Tan, Jianfeng" <jianfeng.tan@intel.com>,
Yuanhan Liu <yuanhan.liu@linux.intel.com>
Cc: "dev@dpdk.org" <dev@dpdk.org>, "Wang, Zhihong" <zhihong.wang@intel.com>
Subject: Re: [dpdk-dev] [PATCH] examples/vhost: fix perf regression
Date: Wed, 20 Jul 2016 03:16:09 +0000 [thread overview]
Message-ID: <82F45D86ADE5454A95A89742C8D1410E032EEFD2@shsmsx102.ccr.corp.intel.com> (raw)
In-Reply-To: <baea10f5-e0ae-e644-7bb0-41a5a81cbe9a@intel.com>
My comments below.
-----Original Message-----
From: dev [mailto:dev-bounces@dpdk.org] On Behalf Of Tan, Jianfeng
Sent: Wednesday, July 20, 2016 10:44 AM
To: Yuanhan Liu <yuanhan.liu@linux.intel.com>
Cc: dev@dpdk.org; Wang, Zhihong <zhihong.wang@intel.com>
Subject: Re: [dpdk-dev] [PATCH] examples/vhost: fix perf regression
Hi Yuanhan,
On 7/20/2016 9:44 AM, Yuanhan Liu wrote:
> On Tue, Jul 19, 2016 at 01:53:11PM +0000, Jianfeng Tan wrote:
>> We find significant perfermance drop introduced by below commit, when
>> vhost example is started with --mergeable 0 and inside vm, kernel
>> virtio-net driver is used to do ip based forwarding.
>>
>> The root cause is that below commit adds support for
>> VIRTIO_NET_F_GUEST_TSO4 and VIRTIO_NET_F_GUEST_TSO6, and when
>> mergeable is disabled, it triggers big_packets path of virtio-net
>> driver. In this path, virtio driver uses 19 desc with 18 4K-sized
>> pages to receive each packet, so that it can receive a big packet
>> with size of 64K. But QEMU only creates 256 desc entries for each vq,
>> which results in that only 13 packets can be received. VM kernel can
>> quickly handle those packets and go to sleep (HLT).
>>
>> As QEMU has no option to set the desc entries of a vq, so here, we
>> disable VIRTIO_NET_F_GUEST_TSO4 and VIRTIO_NET_F_GUEST_TSO6 with
>> VIRTIO_NET_F_HOST_TSO4 and VIRTIO_NET_F_HOST_TSO6 when we disable tso
>> of vhost example, to avoid VM kernel virtio driver go into
>> big_packets path.
>>
>> Fixes: 859b480d5afd ("vhost: add guest offload setting")
>>
>> Reported-by: Qian Xu <qian.q.xu@intel.com>
>> Signed-off-by: Jianfeng Tan <jianfeng.tan@intel.com>
> We could apply this patch, but I don't think it actually fix anything:
>
> - it doesn't fix other vhost applications, say OVS, which is for sure
> way more widly used than vhost-example.
If I remember it correctly, OVS will enable mergeable.
>
> - it doesn't even fix it when tso is enabled and mergeable-rx is disabled
> with this vhost-example.
But we'd better avoid users go into such doubt that performance drops because of that commit under the case tso=off,mergeable=off, right?
Normally, when people enable TSO, they should turn on mergeable, if they don't turn on mergeable, then please don't expect high performance,
so this is not a problem. They may get low performance due to the improper settings.
As to a complete fix for the issue, we may need go back to the TSO feature design for vhost, currently, the feature negotiation code is in the application,
but it's better to be considered in the vhost/virtio library so that application doesn't need to check/set the feature. But now it's too late for the complete fix,
so the workaround is ok for this release from my view.
Thanks,
Jianfeng
>
> Thanks for the good root-cause, btw!
>
> --yliu
next prev parent reply other threads:[~2016-07-20 3:16 UTC|newest]
Thread overview: 16+ messages / expand[flat|nested] mbox.gz Atom feed top
2016-07-19 13:53 Jianfeng Tan
2016-07-20 1:44 ` Yuanhan Liu
2016-07-20 2:44 ` Tan, Jianfeng
2016-07-20 3:16 ` Xu, Qian Q [this message]
2016-07-20 4:00 ` Yuanhan Liu
2016-07-20 3:52 ` Xu, Qian Q
2016-07-20 4:38 ` Yuanhan Liu
2016-07-20 5:50 ` Tan, Jianfeng
2016-07-20 6:13 ` Yuanhan Liu
2016-07-20 6:30 ` Tan, Jianfeng
2016-07-21 0:23 ` [dpdk-dev] [PATCH v2] " Jianfeng Tan
2016-07-21 0:42 ` Tan, Jianfeng
2016-07-21 0:42 ` [dpdk-dev] [PATCH v3] " Jianfeng Tan
2016-07-21 1:34 ` Yuanhan Liu
2016-07-21 1:38 ` Xu, Qian Q
2016-07-22 9:59 ` Thomas Monjalon
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=82F45D86ADE5454A95A89742C8D1410E032EEFD2@shsmsx102.ccr.corp.intel.com \
--to=qian.q.xu@intel.com \
--cc=dev@dpdk.org \
--cc=jianfeng.tan@intel.com \
--cc=yuanhan.liu@linux.intel.com \
--cc=zhihong.wang@intel.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).