patches for DPDK stable branches
 help / color / mirror / Atom feed
From: Pavan Nikhilesh Bhagavatula <pbhagavatula@marvell.com>
To: Feifei Wang <feifei.wang2@arm.com>,
	Jerin Jacob Kollanukkaran <jerinj@marvell.com>,
	Sunil Kumar Kori <skori@marvell.com>,
	David Marchand <david.marchand@redhat.com>
Cc: "dev@dpdk.org" <dev@dpdk.org>, "nd@arm.com" <nd@arm.com>,
	"stable@dpdk.org" <stable@dpdk.org>,
	Honnappa Nagarahalli <honnappa.nagarahalli@arm.com>,
	Honnappa Nagarahalli <Honnappa.Nagarahalli@arm.com>,
	Ruifeng Wang <ruifeng.wang@arm.com>
Subject: Re: [dpdk-stable] [EXT] [dpdk-dev] [PATCH v2 1/1] app/test: collect perf data after worker threads exit
Date: Tue, 9 Mar 2021 10:27:29 +0000
Message-ID: <PH0PR18MB408632D1DE2631E333A4F9C5DE929@PH0PR18MB4086.namprd18.prod.outlook.com> (raw)
In-Reply-To: <20210225093213.2811627-2-feifei.wang2@arm.com>

>The measure_perf function should be executed after worker threads
>exit
>to collect correct perf data. Otherwise, while workers are running, the
>main thread may get incomplete data from workers.
>
>In the meanwhile, remove unnecessary barrier in the test.
>For signal variables "ldata.done" and "ldata.start", no operations
>should keep the order that being executed after them. So the wmb after
>them can be moved.
>
>Fixes: 16a277a24c9f ("test/trace: add performance test cases")
>Cc: jerinj@marvell.com
>Cc: stable@dpdk.org
>
>Suggested-by: Honnappa Nagarahalli
><honnappa.nagarahalli@arm.com>
>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>

Acked-by: Pavan Nikhilesh <pbhagavatula@marvell.com>

>---
> app/test/test_trace_perf.c | 5 ++---
> 1 file changed, 2 insertions(+), 3 deletions(-)
>
>diff --git a/app/test/test_trace_perf.c b/app/test/test_trace_perf.c
>index e1ad8e6f5..46ae7d807 100644
>--- a/app/test/test_trace_perf.c
>+++ b/app/test/test_trace_perf.c
>@@ -79,7 +79,6 @@ signal_workers_to_finish(struct test_data *data)
>
> 	for (workers = 0; workers < data->nb_workers; workers++) {
> 		data->ldata[workers].done = 1;
>-		rte_smp_wmb();
> 	}
> }
>
>@@ -102,7 +101,6 @@ worker_fn_##func(void *arg) \
> { \
> 	struct lcore_data *ldata = arg; \
> 	ldata->started = 1; \
>-	rte_smp_wmb(); \
> 	__worker_##func(ldata); \
> 	return 0; \
> }
>@@ -137,11 +135,12 @@ run_test(const char *str, lcore_function_t f,
>struct test_data *data, size_t sz)
>
> 	wait_till_workers_are_ready(data);
> 	rte_delay_ms(100); /* Wait for some time to accumulate the
>stats */
>-	measure_perf(str, data);
> 	signal_workers_to_finish(data);
>
> 	RTE_LCORE_FOREACH_WORKER(id)
> 		rte_eal_wait_lcore(id);
>+
>+	measure_perf(str, data);
> }
>
> static int
>--
>2.25.1


      parent reply	other threads:[~2021-03-09 10:27 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
     [not found] <20210225093213.2811627-1-feifei.wang2@arm.com>
2021-02-25  9:32 ` [dpdk-stable] " Feifei Wang
2021-03-09  9:06   ` [dpdk-stable] 回复: " Feifei Wang
2021-03-09 12:54     ` [dpdk-stable] [dpdk-dev] " Jerin Jacob
2021-03-09 10:27   ` Pavan Nikhilesh Bhagavatula [this message]

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=PH0PR18MB408632D1DE2631E333A4F9C5DE929@PH0PR18MB4086.namprd18.prod.outlook.com \
    --to=pbhagavatula@marvell.com \
    --cc=david.marchand@redhat.com \
    --cc=dev@dpdk.org \
    --cc=feifei.wang2@arm.com \
    --cc=honnappa.nagarahalli@arm.com \
    --cc=jerinj@marvell.com \
    --cc=nd@arm.com \
    --cc=ruifeng.wang@arm.com \
    --cc=skori@marvell.com \
    --cc=stable@dpdk.org \
    /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

patches for DPDK stable branches

This inbox may be cloned and mirrored by anyone:

	git clone --mirror https://inbox.dpdk.org/stable/0 stable/git/0.git

	# If you have public-inbox 1.1+ installed, you may
	# initialize and index your mirror using the following commands:
	public-inbox-init -V2 stable stable/ https://inbox.dpdk.org/stable \
		stable@dpdk.org
	public-inbox-index stable

Example config snippet for mirrors.
Newsgroup available over NNTP:
	nntp://inbox.dpdk.org/inbox.dpdk.stable


AGPL code for this site: git clone https://public-inbox.org/public-inbox.git