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 479ED2E41 for ; Tue, 18 Oct 2016 16:53:59 +0200 (CEST) Received: from int-mx11.intmail.prod.int.phx2.redhat.com (int-mx11.intmail.prod.int.phx2.redhat.com [10.5.11.24]) (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 B2D6261E4C; Tue, 18 Oct 2016 14:53:58 +0000 (UTC) Received: from [10.36.7.65] (vpn1-7-65.ams2.redhat.com [10.36.7.65]) by int-mx11.intmail.prod.int.phx2.redhat.com (8.14.4/8.14.4) with ESMTP id u9IErtoE011241 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=NO); Tue, 18 Oct 2016 10:53:57 -0400 To: Yuanhan Liu , dev@dpdk.org References: <1474336817-22683-1-git-send-email-zhihong.wang@intel.com> <1476437678-7102-1-git-send-email-yuanhan.liu@linux.intel.com> Cc: Jianbo Liu From: Maxime Coquelin Message-ID: <7f04d548-e39a-e9bb-c918-adeb994002d2@redhat.com> Date: Tue, 18 Oct 2016 16:53:55 +0200 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: <1476437678-7102-1-git-send-email-yuanhan.liu@linux.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.24 X-Greylist: Sender IP whitelisted, not delayed by milter-greylist-4.5.16 (mx1.redhat.com [10.5.110.39]); Tue, 18 Oct 2016 14:53:58 +0000 (UTC) Subject: Re: [dpdk-dev] [PATCH v7 0/7] vhost: optimize mergeable Rx 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: Tue, 18 Oct 2016 14:53:59 -0000 Hi Yuanhan, On 10/14/2016 11:34 AM, Yuanhan Liu wrote: > This is a new set of patches to optimize the mergeable Rx code path. > No refactoring (rewrite) was made this time. It just applies some > findings from Zhihong (kudos to him!) that could improve the mergeable > Rx path on the old code. > > The two major factors that could improve the performance greatly are: > > - copy virtio header together with packet data. This could remove > the buubbles between the two copy to optimize the cache access. > > This is implemented in patch 2 "vhost: optimize cache access" > > - shadow used ring update and update them at once > > The basic idea is to update used ring in a local buffer and flush > them to the virtio used ring at once in the end. Again, this is > for optimizing the cache access. > > This is implemented in patch 5 "vhost: shadow used ring update" > > The two optimizations could yield 40+% performance in micro testing > and 20+% in PVP case testing with 64B packet size. > > Besides that, there are some tiny optimizations, such as prefetch > avail ring (patch 6) and retrieve avail head once (patch 7). > > Note: the shadow used ring tech could also be applied to the non-mrg > Rx path (and even the dequeu) path. I didn't do that for two reasons: > > - we already update used ring in batch in both path: it's not shadowed > first though. > > - it's a bit too late too make many changes at this stage: RC1 is out. > > Please help testing. I tested the following use-cases without noticing any functional problems: - Windows Guests (mergeable ON & OFF, indirect disabled): ping other VM - Linux guests with Kernel driver (mergeable ON & OFF, indirect OFF): iperf between 2 VMs - Linux guest with Virtio PMD (mergeable ON & OFF): testpmd txonly on host, rxonly on guest. Feel free to add my: Tested-by: Maxime Coquelin Thanks, Maxime