From mboxrd@z Thu Jan  1 00:00:00 1970
Return-Path: <maxime.coquelin@redhat.com>
Received: from mx1.redhat.com (mx1.redhat.com [209.132.183.28])
 by dpdk.org (Postfix) with ESMTP id 3AE5B1B123;
 Wed, 24 Oct 2018 12:51:57 +0200 (CEST)
Received: from smtp.corp.redhat.com (int-mx04.intmail.prod.int.phx2.redhat.com
 [10.5.11.14])
 (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits))
 (No client certificate requested)
 by mx1.redhat.com (Postfix) with ESMTPS id 95FC39B2F5;
 Wed, 24 Oct 2018 10:51:56 +0000 (UTC)
Received: from [10.36.112.57] (ovpn-112-57.ams2.redhat.com [10.36.112.57])
 by smtp.corp.redhat.com (Postfix) with ESMTPS id A5FDA5DA67;
 Wed, 24 Oct 2018 10:51:44 +0000 (UTC)
To: dev@dpdk.org, tiwei.bie@intel.com, jfreimann@redhat.com,
 zhihong.wang@intel.com
Cc: stable@dpdk.org
References: <20181023100710.14739-1-maxime.coquelin@redhat.com>
From: Maxime Coquelin <maxime.coquelin@redhat.com>
Message-ID: <82847dae-6dd6-8841-f140-5b91e33c04d7@redhat.com>
Date: Wed, 24 Oct 2018 12:51:22 +0200
User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:60.0) Gecko/20100101
 Thunderbird/60.2.1
MIME-Version: 1.0
In-Reply-To: <20181023100710.14739-1-maxime.coquelin@redhat.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.14
X-Greylist: Sender IP whitelisted, not delayed by milter-greylist-4.5.16
 (mx1.redhat.com [10.5.110.39]); Wed, 24 Oct 2018 10:51:56 +0000 (UTC)
Subject: Re: [dpdk-stable] [PATCH v2] vhost: avoid memory barriers when no
 descriptors dequeued
X-BeenThere: stable@dpdk.org
X-Mailman-Version: 2.1.15
Precedence: list
List-Id: patches for DPDK stable branches <stable.dpdk.org>
List-Unsubscribe: <https://mails.dpdk.org/options/stable>,
 <mailto:stable-request@dpdk.org?subject=unsubscribe>
List-Archive: <http://mails.dpdk.org/archives/stable/>
List-Post: <mailto:stable@dpdk.org>
List-Help: <mailto:stable-request@dpdk.org?subject=help>
List-Subscribe: <https://mails.dpdk.org/listinfo/stable>,
 <mailto:stable-request@dpdk.org?subject=subscribe>
X-List-Received-Date: Wed, 24 Oct 2018 10:51:57 -0000



On 10/23/18 12:07 PM, 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.
> 
> Fixes: ae999ce49dcb ("vhost: add Tx support for packed ring")
> Fixes: 915cf9404225 ("vhost: use shadow used ring in dequeue path")
> Cc:stable@dpdk.org
> 
> Signed-off-by: Maxime Coquelin<maxime.coquelin@redhat.com>
> ---
> 
> Changes in v2:
> - Fix shadow_used_idx reset in error path (Tiwei)
> 
>   lib/librte_vhost/virtio_net.c | 24 ++++++++++++++++--------
>   1 file changed, 16 insertions(+), 8 deletions(-)


Applied to dpdk-next-virtio/master.

Maxime