[RFC,v1,2/6] app/eventdev: remove unnecessary barriers for perf test

Message ID 20201222032237.36046-3-feifei.wang2@arm.com (mailing list archive)
State Superseded, archived
Headers
Series refactor smp barriers in app/eventdev |

Checks

Context Check Description
ci/checkpatch warning coding style issues

Commit Message

Feifei Wang Dec. 22, 2020, 3:22 a.m. UTC
  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 varaible "t->done", which represents the end of the test
signal, is unnecessary. Because after the main lcore updates this
siginal varaible, 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 <feifei.wang2@arm.com>
Reviewed-by: Honnappa Nagarahalli <Honnappa.Nagarahalli@arm.com>
Reviewed-by: Ruifeng Wang <ruifeng.wang@arm.com>
---
 app/test-eventdev/test_perf_common.c | 4 ----
 1 file changed, 4 deletions(-)
  

Patch

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;