From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mga11.intel.com (mga11.intel.com [192.55.52.93]) by dpdk.org (Postfix) with ESMTP id B99933B5 for ; Wed, 20 Jul 2016 05:56:19 +0200 (CEST) Received: from orsmga003.jf.intel.com ([10.7.209.27]) by fmsmga102.fm.intel.com with ESMTP; 19 Jul 2016 20:56:20 -0700 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.28,392,1464678000"; d="scan'208";a="849638218" Received: from yliu-dev.sh.intel.com (HELO yliu-dev) ([10.239.67.162]) by orsmga003.jf.intel.com with ESMTP; 19 Jul 2016 20:56:17 -0700 Date: Wed, 20 Jul 2016 12:00:13 +0800 From: Yuanhan Liu To: "Tan, Jianfeng" Cc: dev@dpdk.org, zhihong.wang@intel.com Message-ID: <20160720040013.GS5146@yliu-dev.sh.intel.com> 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=us-ascii Content-Disposition: inline In-Reply-To: User-Agent: Mutt/1.5.23 (2014-03-12) Subject: Re: [dpdk-dev] [PATCH] examples/vhost: fix perf regression X-BeenThere: dev@dpdk.org X-Mailman-Version: 2.1.15 Precedence: list List-Id: patches and discussions about DPDK List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 20 Jul 2016 03:56:20 -0000 On Wed, Jul 20, 2016 at 10:44:13AM +0800, Tan, Jianfeng wrote: > 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. Yes, and actually, vhost-example also should have enabled it by default. Meanwhile, all features could be enabled/disabled by user. > > > >- 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? I doubt people would actually use vhost-example (besides developer like us), meaning they can NOT see the benifit from this patch; it also means that user __does__ go into doubt that performance drops for the case tso=off,mergeable=off. Actually, it looks wrong to me to fiddle with those flags in the vhost-example. If you want to disable tso, you should go disable it on the qemu side, with something like: csum=off,gso=off,guest_tso4=off,guest_tso6=off,... --yliu