From mboxrd@z Thu Jan 1 00:00:00 1970 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) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=fridaylinux-org.20150623.gappssmtp.com; s=20150623; h=date:from:to:cc:subject:message-id:references:mime-version :content-disposition:in-reply-to:user-agent; bh=0ruz68aD9NqafMtt9OWZePLWCFMqwWzjCaIOu12ivL0=; b=ZYcjWuJXuO9NAWt5HR33v2ojqsJjXaork86R/77EJ+wai61uIe7HMvA1e7im7cox6E t9U9q3YhDCOa4LVjJXmZcs5O6QfwrhM9VuSxBJ5DTfettS99iTpOPO2/KH2ngvoaUpIq +wI6NQmhRa+57lSXBrZdg5T9SABiStXQBXgO8nltFSt6uhm2U4pAV3gk1Cymo9QP8Zwc YMeBTR84+g7VwhNhNlXrBHEW+clVrqqjKfTiWCweETZLUMQhvBqYxzFMlFPVGJjyFeLV pNt1+LNKswk7r/U5ldwJkSn0W4CthvV6ve7cpiRUMrNbd2qz9YDe0LX5F0JIasF1Rrb3 kjJA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:date:from:to:cc:subject:message-id:references :mime-version:content-disposition:in-reply-to:user-agent; bh=0ruz68aD9NqafMtt9OWZePLWCFMqwWzjCaIOu12ivL0=; b=V8LOBpcM8dcz0TNbpebAbQ9f7wqG2rRWIzzG79c+H/APfbzUkuasoN4CQIB7LvGDW+ HBQRxKXvqpZ9WtgwY8nZNNZOKcBJ4yfFBzWQcXyx/Qlu/dEmebHbJ5x1E5PzK6SAwY3e JXxBFz35m9NrNCNcKMRnoUzI3jU/NhEBP0Qqj2ho6sdO8fdrSDJyDDFKbNh75KXTDLTl nFivxBNWcZRJN7dAxd64AmUBvakRwKgHyW392wbLIgo7SKF+WQpkftkeydfcOtlG89H1 EhdsXyNnNkdV+manf5GmlZDCoGa9TbBcxsCeG1BrSj3wdpykAvDgQcuCgl8YAb2G2Vgm OfLA== X-Gm-Message-State: AHPjjUg/B8WfXm+zI0X1oqiBpKJ7X5pChLUA89aJ0EUacIc5Rk9Vp82D 4KFNR3r1I47J/KnY X-Google-Smtp-Source: ADKCNb6sq406Y5wAhPk8Zdkl36NbhEp3drY8vzP6v7pVtTaMqzrr+IA1/YPLhLbxUm1HBFqdtInkOQ== X-Received: by 10.101.76.14 with SMTP id u14mr2139611pgq.409.1504856744916; Fri, 08 Sep 2017 00:45:44 -0700 (PDT) Received: from yliu-home ([45.63.61.64]) by smtp.gmail.com with ESMTPSA id x9sm2538510pfk.40.2017.09.08.00.45.41 (version=TLS1 cipher=ECDHE-RSA-AES128-SHA bits=128/128); Fri, 08 Sep 2017 00:45:43 -0700 (PDT) Date: Fri, 8 Sep 2017 15:41:08 +0800 From: Yuanhan Liu To: Tiwei Bie Cc: dev@dpdk.org, maxime.coquelin@redhat.com, Zhihong Wang , Zhiyong Yang 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 Content-Disposition: inline In-Reply-To: <20170824021939.21306-1-tiwei.bie@intel.com> User-Agent: Mutt/1.5.24 (2015-08-30) 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, 08 Sep 2017 07:45:46 -0000 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