From mboxrd@z Thu Jan 1 00:00:00 1970 From: Yuanhan Liu Subject: Re: [PATCH] vhost: adaptively batch small guest memory copies Date: Fri, 8 Sep 2017 15:41:08 +0800 Message-ID: <20170908074108.GE9736@yliu-home> References: <20170824021939.21306-1-tiwei.bie@intel.com> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Cc: dev@dpdk.org, maxime.coquelin@redhat.com, Zhihong Wang , Zhiyong Yang To: Tiwei Bie Return-path: Received: from mail-pf0-f179.google.com (mail-pf0-f179.google.com [209.85.192.179]) by dpdk.org (Postfix) with ESMTP id 23CDF2BFE for ; Fri, 8 Sep 2017 09:45:45 +0200 (CEST) Received: by mail-pf0-f179.google.com with SMTP id y29so2625103pff.0 for ; Fri, 08 Sep 2017 00:45:45 -0700 (PDT) Content-Disposition: inline In-Reply-To: <20170824021939.21306-1-tiwei.bie@intel.com> List-Id: DPDK patches and discussions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: dev-bounces@dpdk.org Sender: "dev" On Thu, Aug 24, 2017 at 10:19:39AM +0800, 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. The number showed in other replies looks really impressive. Great work! This patch also looks good to me. I have one minor comment though. [...] > +/* > + * Structure contains the info for each batched memory copy. > + */ > +struct burst_copy_elem { > + void *dst; > + void *src; > + uint32_t len; > + uint64_t log_addr; > +}; Like the title says, it's more about batch (but not burst). Also, it's not a good idea to mix burst and batch. I'd suggest you to use the term "batch" consistently. --yliu