From mboxrd@z Thu Jan 1 00:00:00 1970 From: "Tan, Jianfeng" Subject: Re: [PATCH] examples/vhost: fix perf regression Date: Wed, 20 Jul 2016 10:44:13 +0800 Message-ID: References: <1468936391-138371-1-git-send-email-jianfeng.tan@intel.com> <20160720014450.GQ5146@yliu-dev.sh.intel.com> Mime-Version: 1.0 Content-Type: text/plain; charset=windows-1252; format=flowed Content-Transfer-Encoding: 7bit Cc: dev@dpdk.org, zhihong.wang@intel.com To: Yuanhan Liu Return-path: Received: from mga03.intel.com (mga03.intel.com [134.134.136.65]) by dpdk.org (Postfix) with ESMTP id 89493532E for ; Wed, 20 Jul 2016 04:44:15 +0200 (CEST) In-Reply-To: <20160720014450.GQ5146@yliu-dev.sh.intel.com> List-Id: patches and discussions about DPDK List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: dev-bounces@dpdk.org Sender: "dev" 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 >> Signed-off-by: Jianfeng Tan > 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? Thanks, Jianfeng > > Thanks for the good root-cause, btw! > > --yliu