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 69B0D1E2B for ; Fri, 1 Sep 2017 11:45:48 +0200 (CEST) Received: from smtp.corp.redhat.com (int-mx03.intmail.prod.int.phx2.redhat.com [10.5.11.13]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mx1.redhat.com (Postfix) with ESMTPS id A6798267C1; Fri, 1 Sep 2017 09:45:47 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.3.2 mx1.redhat.com A6798267C1 Authentication-Results: ext-mx06.extmail.prod.ext.phx2.redhat.com; dmarc=none (p=none dis=none) header.from=redhat.com Authentication-Results: ext-mx06.extmail.prod.ext.phx2.redhat.com; spf=fail smtp.mailfrom=maxime.coquelin@redhat.com Received: from [10.36.112.32] (ovpn-112-32.ams2.redhat.com [10.36.112.32]) by smtp.corp.redhat.com (Postfix) with ESMTPS id C3BEE60841; Fri, 1 Sep 2017 09:45:44 +0000 (UTC) To: Tiwei Bie , dev@dpdk.org Cc: yliu@fridaylinux.org, Zhihong Wang , Zhiyong Yang , Santosh Shukla , Jerin Jacob , hemant.agrawal@nxp.com References: <20170824021939.21306-1-tiwei.bie@intel.com> From: Maxime Coquelin Message-ID: <8697fb77-a1d6-c3de-2bc4-2a9956fbad36@redhat.com> Date: Fri, 1 Sep 2017 11:45:42 +0200 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:52.0) Gecko/20100101 Thunderbird/52.2.1 MIME-Version: 1.0 In-Reply-To: <20170824021939.21306-1-tiwei.bie@intel.com> Content-Type: text/plain; charset=utf-8; format=flowed Content-Language: en-US Content-Transfer-Encoding: 7bit X-Scanned-By: MIMEDefang 2.79 on 10.5.11.13 X-Greylist: Sender IP whitelisted, not delayed by milter-greylist-4.5.16 (mx1.redhat.com [10.5.110.30]); Fri, 01 Sep 2017 09:45:47 +0000 (UTC) Subject: Re: [dpdk-dev] [PATCH] vhost: adaptively batch small guest memory copies X-BeenThere: dev@dpdk.org X-Mailman-Version: 2.1.15 Precedence: list List-Id: DPDK patches and discussions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 01 Sep 2017 09:45:48 -0000 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. Do you mean that if we would batch unconditionnaly whatever the size, we see performance drop for larger (>256) packets? Other question is about indirect descriptors, my understanding of the patch is that the number of batched copies is limited to the queue size. In theory, we could have more than that with indirect descriptors (first indirect desc for the vnet header, second one for the packet). So in the worst case, we would have the first small copies being batched, but not the last ones if there are more than queue size. So, I think it works, but I'd like your confirmation. > > 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. Agree, I think this is important to have it tested on ARM platforms at least to ensure it doesn't introduce a regression. Adding Santosh, Jerin & Hemant in cc, who might know who could do the test. > 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(-)