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 7A6CE1B4B8; Tue, 23 Oct 2018 14:39:09 +0200 (CEST) Received: from smtp.corp.redhat.com (int-mx01.intmail.prod.int.phx2.redhat.com [10.5.11.11]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mx1.redhat.com (Postfix) with ESMTPS id A88E681F0D; Tue, 23 Oct 2018 12:39:08 +0000 (UTC) Received: from localhost (ovpn-116-75.ams2.redhat.com [10.36.116.75]) by smtp.corp.redhat.com (Postfix) with ESMTPS id 2A8FE6031B; Tue, 23 Oct 2018 12:39:04 +0000 (UTC) Date: Tue, 23 Oct 2018 14:39:03 +0200 From: Jens Freimann To: Maxime Coquelin Cc: dev@dpdk.org, tiwei.bie@intel.com, zhihong.wang@intel.com, stable@dpdk.org Message-ID: <20181023123903.dagzx72lrs2guwhv@jenstp.localdomain> References: <20181023100710.14739-1-maxime.coquelin@redhat.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii; format=flowed Content-Disposition: inline In-Reply-To: <20181023100710.14739-1-maxime.coquelin@redhat.com> User-Agent: NeoMutt/20180716 X-Scanned-By: MIMEDefang 2.79 on 10.5.11.11 X-Greylist: Sender IP whitelisted, not delayed by milter-greylist-4.5.16 (mx1.redhat.com [10.5.110.27]); Tue, 23 Oct 2018 12:39:08 +0000 (UTC) Subject: Re: [dpdk-dev] [dpdk-stable] [PATCH v2] vhost: avoid memory barriers when no descriptors dequeued 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: Tue, 23 Oct 2018 12:39:09 -0000 On Tue, Oct 23, 2018 at 12:07:10PM +0200, Maxime Coquelin wrote: >In both split and packed dequeue paths, flush_shadow_used_ring >and vhost_ring_call variants gets called even if not packets >have been dequeued, and so no descriptors updates happened. > >It has an impact on CPU pipeline, as memory barriers are used >in these functions. > >This patch don't call these functions if no descriptors have >been dequeued. The performance gain with split ring when >dequeue zero-copy is disabled should be null, but should be >noticeable with packed ring or dequeue zero-copy enabled. I tried this with packed ring pmd patch series v8 and it works fine. It doesn't hurt performance either, I see improvements in sending packets from guest to host. Reviewed-by: Jens Freimann Tested-by: Jens Freimann regards, Jens