From mboxrd@z Thu Jan 1 00:00:00 1970 From: Maxime Coquelin Subject: Re: [PATCH] vhost: adaptively batch small guest memory copies Date: Thu, 7 Sep 2017 19:47:57 +0200 Message-ID: References: <20170824021939.21306-1-tiwei.bie@intel.com> Mime-Version: 1.0 Content-Type: text/plain; charset=utf-8; format=flowed Content-Transfer-Encoding: 7bit Cc: yliu@fridaylinux.org, Zhihong Wang , Zhiyong Yang To: Tiwei Bie , dev@dpdk.org Return-path: Received: from mx1.redhat.com (mx1.redhat.com [209.132.183.28]) by dpdk.org (Postfix) with ESMTP id BBC0D2BFE for ; Thu, 7 Sep 2017 19:48:02 +0200 (CEST) In-Reply-To: <20170824021939.21306-1-tiwei.bie@intel.com> Content-Language: en-US List-Id: DPDK patches and discussions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: dev-bounces@dpdk.org Sender: "dev" Hi Tiwei, On 08/24/2017 04:19 AM, Tiwei Bie wrote: > This patch adaptively batches the small guest memory copies. > By batching the small copies, the efficiency of executing the > memory LOAD instructions can be improved greatly, because the > memory LOAD latency can be effectively hidden by the pipeline. > We saw great performance boosts for small packets PVP test. > > This patch improves the performance for small packets, and has > distinguished the packets by size. So although the performance > for big packets doesn't change, it makes it relatively easy to > do some special optimizations for the big packets too. > > Signed-off-by: Tiwei Bie > Signed-off-by: Zhihong Wang > Signed-off-by: Zhiyong Yang > --- > This optimization depends on the CPU internal pipeline design. > So further tests (e.g. ARM) from the community is appreciated. > > lib/librte_vhost/vhost.c | 2 +- > lib/librte_vhost/vhost.h | 13 +++ > lib/librte_vhost/vhost_user.c | 12 +++ > lib/librte_vhost/virtio_net.c | 240 ++++++++++++++++++++++++++++++++---------- > 4 files changed, 209 insertions(+), 58 deletions(-) I did some PVP benchmark with your patch. First I tried my standard PVP setup, with io forwarding on host and macswap on guest in bidirectional mode. With this, I notice no improvement (18.8Mpps), but I think it explains because guest is the bottleneck here. So I change my setup to do csum forwarding on host side, so that host's PMD threads are more loaded. In this case, I notice a great improvement, I get 18.8Mpps with your patch instead of 14.8Mpps without! Great work! Reviewed-by: Maxime Coquelin Thanks, Maxime