All of lore.kernel.org
 help / color / mirror / Atom feed
From: "Tan, Jianfeng" <jianfeng.tan@intel.com>
To: Yuanhan Liu <yuanhan.liu@linux.intel.com>
Cc: dev@dpdk.org, zhihong.wang@intel.com, "Xu, Qian Q" <qian.q.xu@intel.com>
Subject: Re: [PATCH] examples/vhost: fix perf regression
Date: Wed, 20 Jul 2016 13:50:34 +0800	[thread overview]
Message-ID: <9e6084d7-b599-fee2-e575-e3a1ac3fb15b@intel.com> (raw)
In-Reply-To: <20160720043831.GT5146@yliu-dev.sh.intel.com>



On 7/20/2016 12:38 PM, 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")
> And here you are patching vhost example to try to fix an "issue"
> in vhost lib, this is __logically__ wrong.
>
> 	--yliu

This is not an issue from vhost lib's perspective, vhost lib should 
provide all features it supports by default. Applications can 
enable/disable features according to their own requirements. And the 
vhost example after this commit just triggers a slow path of virtio 
driver. So this fix just makes sure vhost example does not go into the 
slow path by default.

By the way, if a fix patch should only involve those commits it will change?

Thanks,
Jianfeng

  reply	other threads:[~2016-07-20  5:50 UTC|newest]

Thread overview: 16+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2016-07-19 13:53 [PATCH] examples/vhost: fix perf regression Jianfeng Tan
2016-07-20  1:44 ` Yuanhan Liu
2016-07-20  2:44   ` Tan, Jianfeng
2016-07-20  3:16     ` Xu, Qian Q
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 [this message]
2016-07-20  6:13     ` Yuanhan Liu
2016-07-20  6:30       ` Tan, Jianfeng
2016-07-21  0:23 ` [PATCH v2] " Jianfeng Tan
2016-07-21  0:42   ` Tan, Jianfeng
2016-07-21  0:42 ` [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=9e6084d7-b599-fee2-e575-e3a1ac3fb15b@intel.com \
    --to=jianfeng.tan@intel.com \
    --cc=dev@dpdk.org \
    --cc=qian.q.xu@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 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.