DPDK patches and discussions
 help / color / mirror / Atom feed
From: Feifei Wang <feifei.wang2@arm.com>
To: Honnappa Nagarahalli <honnappa.nagarahalli@arm.com>,
	Konstantin Ananyev <konstantin.ananyev@intel.com>
Cc: dev@dpdk.org, nd@arm.com, Honnappa.Nagarahalli@arm.com,
	ruifeng.wang@arm.com, Feifei Wang <feifei.wang2@arm.com>
Subject: [dpdk-dev] [PATCH v1 1/2] app/test: remove unnecessary barriers for ring stress test
Date: Tue, 22 Dec 2020 14:30:53 +0800	[thread overview]
Message-ID: <20201222063054.44429-2-feifei.wang2@arm.com> (raw)
In-Reply-To: <20201222063054.44429-1-feifei.wang2@arm.com>

The variable "wrk_cmd" is a signal to control threads from running and
stopping. When worker lcores load "wrk_cmd == WRK_CMD_RUN", they start
running and when worker lcores load "wrk_cmd == WRK_CMD_STOP", they
stop.

For the wmb in test_mt1, no storing operations must keep the order
after storing "wrk_cmd". Thus the wmb is unnecessary.

For the rmb in test_worker, the parameters have been prepared when
worker lcores call "test_worker". It is unnessary to wait wrk_cmd to be
loaded, then the parameters can be loaded, So the rmb can be removed.

In the meanwhile, fix a typo. The note above storing "stop" into
"wrk_cmd" should be "stop test" rather than "start test".

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/test_ring_stress_impl.h | 5 +----
 1 file changed, 1 insertion(+), 4 deletions(-)

diff --git a/app/test/test_ring_stress_impl.h b/app/test/test_ring_stress_impl.h
index f9ca63b90..384555ef9 100644
--- a/app/test/test_ring_stress_impl.h
+++ b/app/test/test_ring_stress_impl.h
@@ -198,7 +198,6 @@ test_worker(void *arg, const char *fname, int32_t prcs)
 	fill_ring_elm(&loc_elm, lc);
 
 	while (wrk_cmd != WRK_CMD_RUN) {
-		rte_smp_rmb();
 		rte_pause();
 	}
 
@@ -357,13 +356,11 @@ test_mt1(int (*test)(void *))
 
 	/* signal worker to start test */
 	wrk_cmd = WRK_CMD_RUN;
-	rte_smp_wmb();
 
 	usleep(run_time * US_PER_S);
 
-	/* signal worker to start test */
+	/* signal worker to stop test */
 	wrk_cmd = WRK_CMD_STOP;
-	rte_smp_wmb();
 
 	/* wait for workers and collect stats. */
 	mc = rte_lcore_id();
-- 
2.17.1


  reply	other threads:[~2020-12-22  6:31 UTC|newest]

Thread overview: 19+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-12-22  6:30 [dpdk-dev] [PATCH v1 0/2] remove smp barriers in app/test Feifei Wang
2020-12-22  6:30 ` Feifei Wang [this message]
2020-12-22 12:42   ` [dpdk-dev] [PATCH v1 1/2] app/test: remove unnecessary barriers for ring stress test Ananyev, Konstantin
2021-01-27 23:00     ` Honnappa Nagarahalli
2021-01-28 14:43       ` Ananyev, Konstantin
2021-01-29  3:17         ` Honnappa Nagarahalli
2021-01-29  4:58           ` Stephen Hemminger
2021-01-30  1:24             ` Honnappa Nagarahalli
2021-02-01  8:37               ` [dpdk-dev] 回复: " Feifei Wang
2021-02-01 13:50                 ` [dpdk-dev] " Ananyev, Konstantin
2021-02-03 16:24                   ` Honnappa Nagarahalli
2021-02-01  8:48               ` [dpdk-dev] 回复: " Feifei Wang
2021-02-01  9:07                 ` Feifei Wang
2020-12-22  6:30 ` [dpdk-dev] [PATCH v1 2/2] app/test: collect perf data after worker threads exit Feifei Wang
2021-03-10  2:12 ` [dpdk-dev] [PATCH v3 0/1] remove smp barriers in app/test Feifei Wang
2021-03-10  2:12   ` [dpdk-dev] [PATCH v3 1/1] test/trace: collect perf data after worker threads exit Feifei Wang
2021-03-10  2:15 ` [dpdk-dev] [PATCH v3 0/1] remove smp barriers in app/test Feifei Wang
2021-03-10  2:15   ` [dpdk-dev] [PATCH v3 1/1] test/trace: collect perf data after worker threads exit Feifei Wang
2021-04-14 14:14     ` David Marchand

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20201222063054.44429-2-feifei.wang2@arm.com \
    --to=feifei.wang2@arm.com \
    --cc=dev@dpdk.org \
    --cc=honnappa.nagarahalli@arm.com \
    --cc=konstantin.ananyev@intel.com \
    --cc=nd@arm.com \
    --cc=ruifeng.wang@arm.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).