From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mails.dpdk.org (mails.dpdk.org [217.70.189.124]) by inbox.dpdk.org (Postfix) with ESMTP id 48925A0A02; Thu, 14 Jan 2021 08:10:34 +0100 (CET) Received: from [217.70.189.124] (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id B8873140F52; Thu, 14 Jan 2021 08:09:13 +0100 (CET) Received: from foss.arm.com (foss.arm.com [217.140.110.172]) by mails.dpdk.org (Postfix) with ESMTP id 141C9140F38 for ; Thu, 14 Jan 2021 08:09:12 +0100 (CET) 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 9752A1FB; Wed, 13 Jan 2021 23:09:11 -0800 (PST) Received: from net-x86-dell-8268.shanghai.arm.com (net-x86-dell-8268.shanghai.arm.com [10.169.210.127]) by usa-sjc-imap-foss1.foss.arm.com (Postfix) with ESMTPA id 328263F719; Wed, 13 Jan 2021 23:09:08 -0800 (PST) From: Feifei Wang To: Jerin Jacob Cc: dev@dpdk.org, Honnappa.Nagarahalli@arm.com, nd@arm.com, Feifei Wang , Phil Yang , Ruifeng Wang Date: Thu, 14 Jan 2021 15:08:28 +0800 Message-Id: <20210114070830.707550-4-feifei.wang2@arm.com> X-Mailer: git-send-email 2.25.1 In-Reply-To: <20210114070830.707550-1-feifei.wang2@arm.com> References: <20210114070830.707550-1-feifei.wang2@arm.com> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit Subject: [dpdk-dev] [PATCH v1 3/5] app/eventdev: replace wmb with thread fence for perf test X-BeenThere: dev@dpdk.org X-Mailman-Version: 2.1.29 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" Simply replace rte_smp barrier with atomic threand fence. Signed-off-by: Phil Yang Signed-off-by: Feifei Wang Reviewed-by: Ruifeng Wang --- app/test-eventdev/test_perf_common.h | 16 ++++++++-------- 1 file changed, 8 insertions(+), 8 deletions(-) diff --git a/app/test-eventdev/test_perf_common.h b/app/test-eventdev/test_perf_common.h index e7233e5a5..9785dc3e2 100644 --- a/app/test-eventdev/test_perf_common.h +++ b/app/test-eventdev/test_perf_common.h @@ -98,11 +98,11 @@ perf_process_last_stage(struct rte_mempool *const pool, { bufs[count++] = ev->event_ptr; - /* wmb here ensures event_prt is stored before - * updating the number of processed packets - * for worker lcores + /* release fence here ensures event_prt is + * stored before updating the number of + * processed packets for worker lcores */ - rte_smp_wmb(); + rte_atomic_thread_fence(__ATOMIC_RELEASE); w->processed_pkts++; if (unlikely(count == buf_sz)) { @@ -122,11 +122,11 @@ perf_process_last_stage_latency(struct rte_mempool *const pool, bufs[count++] = ev->event_ptr; - /* wmb here ensures event_prt is stored before - * updating the number of processed packets - * for worker lcores + /* release fence here ensures event_prt is + * stored before updating the number of + * processed packets for worker lcores */ - rte_smp_wmb(); + rte_atomic_thread_fence(__ATOMIC_RELEASE); w->processed_pkts++; if (unlikely(count == buf_sz)) { -- 2.25.1