DPDK patches and discussions
 help / color / mirror / Atom feed
From: Rich Lane <rich.lane@bigswitch.com>
To: Yuanhan Liu <yuanhan.liu@linux.intel.com>
Cc: dev@dpdk.org, "huawei.xie" <huawei.xie@intel.com>
Subject: Re: [dpdk-dev] [PATCH 0/3] [RFC] vhost: micro vhost optimization
Date: Tue, 10 May 2016 14:49:43 -0700	[thread overview]
Message-ID: <CAGSMBPM3NCaw+Q1U2zkcAJBkv2DZP=z_GPLodfB=9eur7hrcag@mail.gmail.com> (raw)
In-Reply-To: <1462236378-7604-1-git-send-email-yuanhan.liu@linux.intel.com>

I see a significant performance improvement with these patches, around 5%
at 64 bytes.

The one patch that didn't give any performance boost for me was "vhost:
arrange virtio_net fields for better cache sharing".

Tested-by: Rich Lane <rich.lane@bigswitch.com>

On Mon, May 2, 2016 at 5:46 PM, Yuanhan Liu <yuanhan.liu@linux.intel.com>
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
>
>

  parent reply	other threads:[~2016-05-10 21:49 UTC|newest]

Thread overview: 16+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2016-05-03  0:46 Yuanhan Liu
2016-05-03  0:46 ` [dpdk-dev] [PATCH 1/3] vhost: pre update used ring for Tx and Rx Yuanhan Liu
2016-06-01  6:40   ` Xie, Huawei
2016-06-01  6:55     ` Yuanhan Liu
2016-06-03  8:18       ` Xie, Huawei
2016-06-01 13:05     ` Michael S. Tsirkin
2016-05-03  0:46 ` [dpdk-dev] [PATCH 2/3] vhost: optimize dequeue for small packets Yuanhan Liu
2016-06-01  6:24   ` Xie, Huawei
2016-06-01  6:44     ` Yuanhan Liu
2016-06-03  7:42       ` Xie, Huawei
2016-06-03  7:43   ` Xie, Huawei
2016-05-03  0:46 ` [dpdk-dev] [PATCH 3/3] vhost: arrange virtio_net fields for better cache sharing Yuanhan Liu
2016-06-01  6:42   ` Xie, Huawei
2016-05-10 21:49 ` Rich Lane [this message]
2016-05-10 22:08   ` [dpdk-dev] [PATCH 0/3] [RFC] vhost: micro vhost optimization Yuanhan Liu
2016-06-14 12:42 ` Yuanhan Liu

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to='CAGSMBPM3NCaw+Q1U2zkcAJBkv2DZP=z_GPLodfB=9eur7hrcag@mail.gmail.com' \
    --to=rich.lane@bigswitch.com \
    --cc=dev@dpdk.org \
    --cc=huawei.xie@intel.com \
    --cc=yuanhan.liu@linux.intel.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).