From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mga03.intel.com (mga03.intel.com [134.134.136.65]) by dpdk.org (Postfix) with ESMTP id D1FDF378B for ; Mon, 10 Oct 2016 16:41:14 +0200 (CEST) Received: from fmsmga006.fm.intel.com ([10.253.24.20]) by orsmga103.jf.intel.com with ESMTP; 10 Oct 2016 07:41:13 -0700 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.31,324,1473145200"; d="scan'208";a="18038976" Received: from yliu-dev.sh.intel.com (HELO yliu-dev) ([10.239.67.162]) by fmsmga006.fm.intel.com with ESMTP; 10 Oct 2016 07:41:12 -0700 Date: Mon, 10 Oct 2016 22:42:09 +0800 From: Yuanhan Liu To: Maxime Coquelin Cc: "Michael S. Tsirkin" , Stephen Hemminger , dev@dpdk.org, qemu-devel@nongnu.org Message-ID: <20161010144209.GI1597@yliu-dev.sh.intel.com> References: <20160929205047-mutt-send-email-mst@kernel.org> <2889e609-f750-a4e1-66f8-768bb07a2339@redhat.com> <20160929231252-mutt-send-email-mst@kernel.org> <05d62750-303c-4b9b-a5cb-9db8552f0ab2@redhat.com> <2b458818-01ef-0533-4366-1c35a8452e4a@redhat.com> <20160930221241-mutt-send-email-mst@kernel.org> <20161010040531.GZ1597@yliu-dev.sh.intel.com> <20161010070800-mutt-send-email-mst@kernel.org> <20161010042209.GB1597@yliu-dev.sh.intel.com> <3b71f113-26af-711c-4060-ca576260ec72@redhat.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <3b71f113-26af-711c-4060-ca576260ec72@redhat.com> User-Agent: Mutt/1.5.23 (2014-03-12) Subject: Re: [dpdk-dev] [Qemu-devel] [PATCH 1/2] vhost: enable any layout feature X-BeenThere: dev@dpdk.org X-Mailman-Version: 2.1.15 Precedence: list List-Id: patches and discussions about DPDK List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 10 Oct 2016 14:41:15 -0000 On Mon, Oct 10, 2016 at 02:40:44PM +0200, Maxime Coquelin wrote: > >>>At that time, a packet always use 2 descs. Since indirect desc is > >>>enabled (by default) now, the assumption is not true then. What's > >>>worse, it might even slow things a bit down. That should also be > >>>part of the reason why performance is slightly worse than before. > >>> > >>> --yliu > >> > >>I'm not sure I get what you are saying > >> > >>>commit 1d41d77cf81c448c1b09e1e859bfd300e2054a98 > >>>Author: Yuanhan Liu > >>>Date: Mon May 2 17:46:17 2016 -0700 > >>> > >>> vhost: optimize dequeue for small packets > >>> > >>> A virtio driver normally uses at least 2 desc buffers for Tx: the > >>> first for storing the header, and the others for storing the data. > >>> > >>> Therefore, we could fetch the first data desc buf before the main > >>> loop, and do the copy first before the check of "are we done yet?". > >>> This could save one check for small packets that just have one data > >>> desc buffer and need one mbuf to store it. > >>> > >>> Signed-off-by: Yuanhan Liu > >>> Acked-by: Huawei Xie > >>> Tested-by: Rich Lane > >> > >>This fast-paths the 2-descriptors format but it's not active > >>for indirect descriptors. Is this what you mean? > > > >Yes. It's also not active when ANY_LAYOUT is actually turned on. > >>Should be a simple matter to apply this optimization for indirect. > > > >Might be. > > If I understand the code correctly, indirect descs also benefit from this > optimization, or am I missing something? Aha..., you are right! --yliu