From: Phil Yang <Phil.Yang@arm.com>
To: Lukasz Wojciechowski <l.wojciechow@partner.samsung.com>,
Harry van Haaren <harry.van.haaren@intel.com>,
"dev@dpdk.org" <dev@dpdk.org>
Cc: Honnappa Nagarahalli <Honnappa.Nagarahalli@arm.com>, nd <nd@arm.com>
Subject: Re: [dpdk-dev] [PATCH] test/service: add perf test for service on app lcore
Date: Wed, 6 May 2020 14:33:56 +0000 [thread overview]
Message-ID: <PR2PR08MB4635D16ED7921CBF367FE2F5E9A40@PR2PR08MB4635.eurprd08.prod.outlook.com> (raw)
In-Reply-To: <38e4b29c-4aaa-87f8-8e3f-498d4be2fcf0@partner.samsung.com>
> -----Original Message-----
> From: Lukasz Wojciechowski <l.wojciechow@partner.samsung.com>
> Sent: Tuesday, May 5, 2020 4:50 AM
> To: Harry van Haaren <harry.van.haaren@intel.com>; dev@dpdk.org
> Cc: Honnappa Nagarahalli <Honnappa.Nagarahalli@arm.com>; Phil Yang
> <Phil.Yang@arm.com>
> Subject: Re: [dpdk-dev] [PATCH] test/service: add perf test for service on
> app lcore
>
>
> W dniu 01.05.2020 o 17:56, Harry van Haaren pisze:
> > Add a performance test to the service run on app lcore auto-
> > test. This test runs the service in a tight loop, and measures
> > cycles passed, printing the results. It provides a quick cycle
> > cost value, enabling measuring performance of the function to
> > run a service on an application lcore.
> >
> > Signed-off-by: Harry van Haaren <harry.van.haaren@intel.com>
> >
> > ---
> >
> > I'm suggesting to merge this patch before the bugfix/C11 patch series,
> > (v2 currently here: https://protect2.fireeye.com/url?k=fda15556-
> a06d9cd2-fda0de19-0cc47aa8f5ba-
> 177ac65d20682aa8&q=1&u=http%3A%2F%2Fpatches.dpdk.org%2Fpatch%2F
> 69199%2F )
> > as this would enable users to benchmark the "before" and "after"
> > states of the bugfix/C11 patches easier.
> >
> > ---
> > app/test/test_service_cores.c | 12 +++++++++++-
> > 1 file changed, 11 insertions(+), 1 deletion(-)
> >
> > diff --git a/app/test/test_service_cores.c b/app/test/test_service_cores.c
> > index a922c7ddc..469243314 100644
> > --- a/app/test/test_service_cores.c
> > +++ b/app/test/test_service_cores.c
> > @@ -789,8 +789,18 @@ service_app_lcore_poll_impl(const int mt_safe)
> > "MT Unsafe: App core1 didn't return -
> EBUSY");
> > }
> >
> > - unregister_all();
> > + /* Performance test: call in a loop, and measure tsc() */
> > + const uint32_t perf_iters = (1 << 12);
> > + uint64_t start = rte_rdtsc();
> > + for (uint32_t i = 0; i < perf_iters; i++) {
> > + int err = service_run_on_app_core_func(&id);
> > + TEST_ASSERT_EQUAL(0, err, "perf test: returned run failure");
> > + }
> > + uint64_t end = rte_rdtsc();
> > + printf("perf test for %s: %0.1f cycles per call\n", mt_safe ?
> > + "MT Safe" : "MT Unsafe", (end - start)/(float)perf_iters);
> >
> > + unregister_all();
> > return TEST_SUCCESS;
> > }
> >
>
> Hi Harry,
>
>
> I like the idea of adding this test. I checked it and it works fine.
> However have you considered adding it as a separate testcase or even
> better as "service_perf_autotest" command ?
>
> With your changes the: service_app_lcore_mt_safe and
> service_app_lcore_mt_unsafe unit tests cases have multiple
> functionalities: they test simultaneous execution of service and they do
> performance checks.
+1 for this.
This patch will skip MT safe UT, but it will continue the MT safe performance test. It's a defect. E.g:
-------
+ TestCase [12] : service_mt_safe_poll skipped
perf test for MT Safe: 40.2 cycles per call
+ TestCase [13] : service_app_lcore_mt_safe succeeded
perf test for MT Unsafe: 53.7 cycles per call
--------
If you want to put the performance test and functional test in the same test, I think it is better to add some indents before print the performance test output to align with the functional test output format. Such as:
------
+ TestCase [13] : service_app_lcore_mt_safe succeeded
+ perf test for MT Unsafe: 53.7 cycles per call
------
According to this performance case, the C11 version patches got 20% performance improvement on aarch64 and 8.5% on x86 for the MT unsafe case. In MT safe case, it got 10% performance improvement on aarch64 and 17% on x86. These are preliminary test results, only covered one testbed for each platform.
Thanks,
Phil
next prev parent reply other threads:[~2020-05-06 14:34 UTC|newest]
Thread overview: 11+ messages / expand[flat|nested] mbox.gz Atom feed top
[not found] <CGME20200501155607eucas1p2509870b6b5f4cc520dca11888e221b1b@eucas1p2.samsung.com>
2020-05-01 15:56 ` Harry van Haaren
2020-05-04 20:50 ` Lukasz Wojciechowski
2020-05-05 10:21 ` Van Haaren, Harry
2020-05-05 12:38 ` Lukasz Wojciechowski
2020-05-06 14:33 ` Phil Yang [this message]
2020-05-06 15:44 ` David Marchand
2020-05-06 17:00 ` Van Haaren, Harry
2020-05-06 17:16 ` [dpdk-dev] [PATCH v2] " Harry van Haaren
2020-05-07 6:28 ` Phil Yang
2020-05-07 12:11 ` David Marchand
2020-05-11 11:20 ` 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=PR2PR08MB4635D16ED7921CBF367FE2F5E9A40@PR2PR08MB4635.eurprd08.prod.outlook.com \
--to=phil.yang@arm.com \
--cc=Honnappa.Nagarahalli@arm.com \
--cc=dev@dpdk.org \
--cc=harry.van.haaren@intel.com \
--cc=l.wojciechow@partner.samsung.com \
--cc=nd@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).