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 91018A09EF; Tue, 22 Dec 2020 06:08:27 +0100 (CET) Received: from [92.243.14.124] (localhost [127.0.0.1]) by dpdk.org (Postfix) with ESMTP id 3BB78CBB4; Tue, 22 Dec 2020 06:07:46 +0100 (CET) Received: from foss.arm.com (foss.arm.com [217.140.110.172]) by dpdk.org (Postfix) with ESMTP id 0EC21CAC4 for ; Tue, 22 Dec 2020 06:07:44 +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 7240A106F; Mon, 21 Dec 2020 21:07:42 -0800 (PST) Received: from net-x86-dell-8268.shanghai.arm.com (net-x86-dell-8268.shanghai.arm.com [10.169.210.131]) by usa-sjc-imap-foss1.foss.arm.com (Postfix) with ESMTPA id 8FE8A3F718; Mon, 21 Dec 2020 21:07:40 -0800 (PST) From: Feifei Wang To: Jerin Jacob Cc: dev@dpdk.org, nd@arm.com, Honnappa.Nagarahalli@arm.com, Feifei Wang Date: Tue, 22 Dec 2020 13:07:23 +0800 Message-Id: <20201222050728.41000-3-feifei.wang2@arm.com> X-Mailer: git-send-email 2.17.1 In-Reply-To: <20201222050728.41000-1-feifei.wang2@arm.com> References: <20201222050728.41000-1-feifei.wang2@arm.com> Subject: [dpdk-dev] [RFC PATCH v1 2/6] app/eventdev: remove unnecessary barriers for perf test 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" For "processed_pkts" and "total_latency" functions, no operations should keep the order that being executed before loading "worker[i].processed_pkts". Thus rmb is unnecessary before loading. For "perf_launch_lcores" function, wmb after that the main lcore updates the variable "t->done", which represents the end of the test signal, is unnecessary. Because after the main lcore updates this siginal variable, it will jump out of the launch function loop, and wait other lcores stop or return error in the main function(evt_main.c). During this time, there is no important storing operation and thus no need for wmb. Signed-off-by: Feifei Wang Reviewed-by: Ruifeng Wang --- app/test-eventdev/test_perf_common.c | 4 ---- 1 file changed, 4 deletions(-) diff --git a/app/test-eventdev/test_perf_common.c b/app/test-eventdev/test_perf_common.c index 955edb752..34cded373 100644 --- a/app/test-eventdev/test_perf_common.c +++ b/app/test-eventdev/test_perf_common.c @@ -224,7 +224,6 @@ processed_pkts(struct test_perf *t) uint8_t i; uint64_t total = 0; - rte_smp_rmb(); for (i = 0; i < t->nb_workers; i++) total += t->worker[i].processed_pkts; @@ -237,7 +236,6 @@ total_latency(struct test_perf *t) uint8_t i; uint64_t total = 0; - rte_smp_rmb(); for (i = 0; i < t->nb_workers; i++) total += t->worker[i].latency; @@ -327,7 +325,6 @@ perf_launch_lcores(struct evt_test *test, struct evt_options *opt, opt->prod_type == EVT_PROD_TYPE_EVENT_TIMER_ADPTR) { t->done = true; - rte_smp_wmb(); break; } } @@ -341,7 +338,6 @@ perf_launch_lcores(struct evt_test *test, struct evt_options *opt, rte_event_dev_dump(opt->dev_id, stdout); evt_err("No schedules for seconds, deadlock"); t->done = true; - rte_smp_wmb(); break; } dead_lock_remaining = remaining; -- 2.17.1