From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mx1.redhat.com (mx1.redhat.com [209.132.183.28]) by dpdk.org (Postfix) with ESMTP id A00382716 for ; Fri, 4 Nov 2016 08:42:03 +0100 (CET) Received: from int-mx09.intmail.prod.int.phx2.redhat.com (int-mx09.intmail.prod.int.phx2.redhat.com [10.5.11.22]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mx1.redhat.com (Postfix) with ESMTPS id 054B390C8C; Fri, 4 Nov 2016 07:42:02 +0000 (UTC) Received: from [10.36.4.213] (vpn1-4-213.ams2.redhat.com [10.36.4.213]) by int-mx09.intmail.prod.int.phx2.redhat.com (8.14.4/8.14.4) with ESMTP id uA47fxQp008081 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=NO); Fri, 4 Nov 2016 03:42:00 -0400 To: "Xu, Qian Q" , "Wang, Zhihong" , Yuanhan Liu References: <1474965769-24782-1-git-send-email-maxime.coquelin@redhat.com> <8F6C2BD409508844A0EFC19955BE09414E7CE6D1@SHSMSX103.ccr.corp.intel.com> <70cc3b89-d680-1519-add3-f38b228e65b5@redhat.com> <20161017132121.GG16751@yliu-dev.sh.intel.com> <8F6C2BD409508844A0EFC19955BE09414E7D8BDF@SHSMSX103.ccr.corp.intel.com> <20161027103317.GM16751@yliu-dev.sh.intel.com> <0ba8f8c9-2174-b3c1-4f07-f6911bffa6cd@redhat.com> <20161027104621.GN16751@yliu-dev.sh.intel.com> <8F6C2BD409508844A0EFC19955BE09414E7D90C7@SHSMSX103.ccr.corp.intel.com> <88169067-290d-a7bb-ab2c-c9b8ec1b1ded@redhat.com> <8F6C2BD409508844A0EFC19955BE09414E7DA533@SHSMSX103.ccr.corp.intel.com> <82F45D86ADE5454A95A89742C8D1410E3923865A@shsmsx102.ccr.corp.intel.com> Cc: "mst@redhat.com" , "dev@dpdk.org" , "vkaplans@redhat.com" From: Maxime Coquelin Message-ID: <7e4dd1a5-2dcd-3ac0-de65-7b70f4447f35@redhat.com> Date: Fri, 4 Nov 2016 08:41:58 +0100 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:45.0) Gecko/20100101 Thunderbird/45.2.0 MIME-Version: 1.0 In-Reply-To: <82F45D86ADE5454A95A89742C8D1410E3923865A@shsmsx102.ccr.corp.intel.com> Content-Type: text/plain; charset=windows-1252; format=flowed Content-Transfer-Encoding: 7bit X-Scanned-By: MIMEDefang 2.68 on 10.5.11.22 X-Greylist: Sender IP whitelisted, not delayed by milter-greylist-4.5.16 (mx1.redhat.com [10.5.110.29]); Fri, 04 Nov 2016 07:42:02 +0000 (UTC) Subject: Re: [dpdk-dev] [PATCH v4] vhost: Add indirect descriptors support to the TX path 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: Fri, 04 Nov 2016 07:42:04 -0000 Hi, On 11/04/2016 07:18 AM, Xu, Qian Q wrote: > > > -----Original Message----- > From: dev [mailto:dev-bounces@dpdk.org] On Behalf Of Maxime Coquelin > Sent: Thursday, November 3, 2016 4:11 PM > To: Wang, Zhihong ; Yuanhan Liu > Cc: mst@redhat.com; dev@dpdk.org; vkaplans@redhat.com > Subject: Re: [dpdk-dev] [PATCH v4] vhost: Add indirect descriptors support to the TX path > > >> >> The strange thing with both of our figures is that this is below from >> what I obtain with my SandyBridge machine. The SB cpu freq is 4% >> higher, but that doesn't explain the gap between the measurements. >> >> I'm continuing the investigations on my side. >> Maybe we should fix a deadline, and decide do disable indirect in >> Virtio PMD if root cause not identified/fixed at some point? >> >> Yuanhan, what do you think? > > I have done some measurements using perf, and know understand better what happens. > > With indirect descriptors, I can see a cache miss when fetching the descriptors in the indirect table. Actually, this is expected, so we prefetch the first desc as soon as possible, but still not soon enough to make it transparent. > In direct descriptors case, the desc in the virtqueue seems to be remain in the cache from its previous use, so we have a hit. > > That said, in realistic use-case, I think we should not have a hit, even with direct descriptors. > Indeed, the test case use testpmd on guest side with the forwarding set in IO mode. It means the packet content is never accessed by the guest. > > In my experiments, I am used to set the "macswap" forwarding mode, which swaps src and dest MAC addresses in the packet. I find it more realistic, because I don't see the point in sending packets to the guest if it is not accessed (not even its header). > > I tried again the test case, this time with setting the forwarding mode to macswap in the guest. This time, I get same performance with both direct and indirect (indirect even a little better with a small optimization, consisting in prefetching the 2 first descs systematically as we know there are contiguous). > > Do you agree we should assume that the packet (header or/and buf) will always be accessed by the guest application? > ----Maybe it's true in many real use case. But we also need ensure the performance for "io fwd" has no performance drop. As I know, OVS-DPDK team will do the performance benchmark based on "IO fwd" for virtio part, so they will also see some performance drop. And we just thought if it's possible to make the feature default off then if someone wanted to use it can turn it on. People can choose if they want to use the feature, just like vhost dequeue zero copy. OVS adds an overhead compared to testpmd on host, and its cache utilization might have the same effect as doing macswap. Do you know who could test with OVS? I would be interested in the results. And the difference today with zero-copy is that it can be enabled at runtime, whereas we can only do it at build time on guest side for indirect. It can be disabled in QEMU command line though. Thanks, Maxime