From mboxrd@z Thu Jan 1 00:00:00 1970 From: Yuanhan Liu Subject: Re: [PATCH 0/3] [RFC] vhost: micro vhost optimization Date: Tue, 10 May 2016 15:08:45 -0700 Message-ID: <20160510220845.GW5641@yliu-dev.sh.intel.com> References: <1462236378-7604-1-git-send-email-yuanhan.liu@linux.intel.com> Mime-Version: 1.0 Content-Type: text/plain; charset=iso-8859-1 Content-Transfer-Encoding: quoted-printable Cc: dev@dpdk.org, "huawei.xie" To: Rich Lane Return-path: Received: from mga03.intel.com (mga03.intel.com [134.134.136.65]) by dpdk.org (Postfix) with ESMTP id 33B73C32C for ; Wed, 11 May 2016 00:04:01 +0200 (CEST) Content-Disposition: inline In-Reply-To: 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" On Tue, May 10, 2016 at 02:49:43PM -0700, Rich Lane wrote: > I see a significant performance improvement with these patches, around = 5% at 64 > bytes. Thanks for testing. >=20 > The one patch that didn't give any performance boost for me was "vhost:= arrange > virtio_net fields for better cache sharing". Yeah, same here from my test. I mean, in theory, it should give us a tiny boost, it doesn't in real life though. And since it (should) do no harm, I would still include this patch in this set. Maybe I should have noted at first that no real perf gain from the 3rd patch. --yliu >=20 > Tested-by: Rich Lane >=20 > On Mon, May 2, 2016 at 5:46 PM, Yuanhan Liu > wrote: >=20 > Here is a small patch set does the micro optimization, which brings= about > 10% performance boost in my 64B packet testing, with the following = topo: >=20 > =A0 =A0 pkt generator <----> NIC <-----> Virtio NIC >=20 > Patch 1 pre updates the used ring and update them in batch. It shou= ld be > feasible from my understanding: there will be no issue, guest drive= r will > not start processing them as far as we haven't updated the "used->i= dx" > yet. I could miss something though. >=20 > Patch 2 saves one check for small packets (that can be hold in one = desc > buf and mbuf). >=20 > Patch 3 moves several frequently used fields into one cache line, f= or > better cache sharing. >=20 > Note that this patch set is based on my latest vhost ABI refactorin= g > patchset. >=20 >=20 > --- > Yuanhan Liu (3): > =A0 vhost: pre update used ring for Tx and Rx > =A0 vhost: optimize dequeue for small packets > =A0 vhost: arrange virtio_net fields for better cache sharing >=20 > =A0lib/librte_vhost/vhost-net.h=A0 |=A0 =A08 +-- > =A0lib/librte_vhost/vhost_rxtx.c | 110 > ++++++++++++++++++++++++------------------ > =A02 files changed, 68 insertions(+), 50 deletions(-) > =20 > -- > 1.9.0 >=20 >=20 >=20