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, 14 Jun 2016 20:42:09 +0800 Message-ID: <20160614124209.GY10038@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=us-ascii Cc: huawei.xie@intel.com To: dev@dpdk.org Return-path: Received: from mga11.intel.com (mga11.intel.com [192.55.52.93]) by dpdk.org (Postfix) with ESMTP id 1B6E28E88 for ; Tue, 14 Jun 2016 14:40:00 +0200 (CEST) Content-Disposition: inline In-Reply-To: <1462236378-7604-1-git-send-email-yuanhan.liu@linux.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" Applied to dpdk-next-virtio. --yliu On Mon, May 02, 2016 at 05:46:15PM -0700, Yuanhan Liu wrote: > 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: > > pkt generator <----> NIC <-----> Virtio NIC > > Patch 1 pre updates the used ring and update them in batch. It should be > feasible from my understanding: there will be no issue, guest driver will > not start processing them as far as we haven't updated the "used->idx" > yet. I could miss something though. > > Patch 2 saves one check for small packets (that can be hold in one desc > buf and mbuf). > > Patch 3 moves several frequently used fields into one cache line, for > better cache sharing. > > Note that this patch set is based on my latest vhost ABI refactoring patchset. > > > --- > Yuanhan Liu (3): > vhost: pre update used ring for Tx and Rx > vhost: optimize dequeue for small packets > vhost: arrange virtio_net fields for better cache sharing > > lib/librte_vhost/vhost-net.h | 8 +-- > lib/librte_vhost/vhost_rxtx.c | 110 ++++++++++++++++++++++++------------------ > 2 files changed, 68 insertions(+), 50 deletions(-) > > -- > 1.9.0