From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from dpdk.org (dpdk.org [92.243.14.124]) by inbox.dpdk.org (Postfix) with ESMTP id C31FEA2EFC for ; Tue, 17 Sep 2019 07:29:05 +0200 (CEST) Received: from [92.243.14.124] (localhost [127.0.0.1]) by dpdk.org (Postfix) with ESMTP id B6A951BF74; Tue, 17 Sep 2019 07:29:03 +0200 (CEST) Received: from foss.arm.com (foss.arm.com [217.140.110.172]) by dpdk.org (Postfix) with ESMTP id AE2751BF37 for ; Tue, 17 Sep 2019 07:29:01 +0200 (CEST) Received: from usa-sjc-imap-foss1.foss.arm.com (unknown [10.121.207.14]) by usa-sjc-mx-foss1.foss.arm.com (Postfix) with ESMTP id C8D7328; Mon, 16 Sep 2019 22:29:00 -0700 (PDT) Received: from net-arm-thunderx2-01.test.ast.arm.com (net-arm-thunderx2-01.shanghai.arm.com [10.169.40.40]) by usa-sjc-imap-foss1.foss.arm.com (Postfix) with ESMTPA id F2EE83F575; Mon, 16 Sep 2019 22:31:28 -0700 (PDT) From: Joyce Kong To: dev@dpdk.org Cc: nd@arm.com, maxime.coquelin@redhat.com, yinan.wang@intel.com, bruce.richardson@intel.com, tiwei.bie@intel.com, zhihong.wang@intel.com, amorenoz@redhat.com, xiao.w.wang@intel.com, yong.liu@intel.com, jfreimann@redhat.com, honnappa.nagarahalli@arm.com, gavin.hu@arm.com Date: Tue, 17 Sep 2019 13:28:24 +0800 Message-Id: <1568698107-36668-1-git-send-email-joyce.kong@arm.com> X-Mailer: git-send-email 2.7.4 In-Reply-To: <1566893979-3290-1-git-send-email-joyce.kong@arm.com> References: <1566893979-3290-1-git-send-email-joyce.kong@arm.com> Subject: [dpdk-dev] [PATCH v4 0/2] virtio: one way barrier for packed vring flags 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: , Errors-To: dev-bounces@dpdk.org Sender: "dev" This patch set replaces the two-way barriers with C11 one-way barriers for packed vring flags, when the frontend and backend are implemented in software. By doing vhost-user + virtio-user case benchmarking, 9% performance gain in the RFC2544 test was measured on Thunderx2 platform.[1] And by doing VM2VM case benchmarking, 11% perf gain was measured on Ampere platform. [1]https://doc.dpdk.org/dts/test_plans/pvp_multi_paths_performance_test_plan.html PVP test with virtio 1.1 mergeable path v4: Use rte_smp_rmb/wmb instead of __atomic_load/store_n on x86 as it reports a better perf(~1.5%), which comes from the saved branch by the compiler. The if and else branch are identical with the smp and cio barriers both defined as compiler barriers on x86. http://inbox.dpdk.org/dev/E0CBA5A1980F1F408E1F28F9991B5B1D50EFF246@SHSMSX104.ccr.corp.intel.com/ v3: Wrap C11 one-way barriers and DMA barriers(rte_cio_*) together with an inline fuction. v2: Convert RFC to patch. Joyce Kong (2): virtio: one way barrier for packed vring desc avail flags virtio: one way barrier for packed vring desc used flags drivers/net/virtio/virtio_rxtx.c | 25 +++++++----- drivers/net/virtio/virtio_user/virtio_user_dev.c | 10 +++-- drivers/net/virtio/virtqueue.h | 49 +++++++++++++++++++++++- lib/librte_vhost/vhost.h | 2 +- lib/librte_vhost/virtio_net.c | 16 ++++---- 5 files changed, 79 insertions(+), 23 deletions(-) -- 2.7.4