[dpdk-dev] [PATCH] test/service: add perf test for service on app lcore
Van Haaren, Harry
harry.van.haaren at intel.com
Wed May 6 19:00:53 CEST 2020
> -----Original Message-----
> From: David Marchand <david.marchand at redhat.com>
> Sent: Wednesday, May 6, 2020 4:44 PM
> To: Van Haaren, Harry <harry.van.haaren at intel.com>
> Cc: dev <dev at dpdk.org>; Honnappa Nagarahalli
> <honnappa.nagarahalli at arm.com>; Phil Yang <phil.yang at arm.com>
> Subject: Re: [dpdk-dev] [PATCH] test/service: add perf test for service on app
<snip>
> > + /* 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++) {
>
> - How long does this test take now?
> We tend to put performance tests in dedicated tests to avoid issues in Travis.
> I suppose this is quick, but still want a confirmation.
Can confirm this is quick, blink of an eye quick, maybe ~250k cycles.
> - Centos7/RHEL7 gcc is not happy with this.
>
> http://mails.dpdk.org/archives/test-report/2020-May/129993.html
>
> ../app/test/test_service_cores.c: In function ‘service_app_lcore_poll_impl’:
> ../app/test/test_service_cores.c:795:2: error: ‘for’ loop initial
> declarations are only allowed in C99 mode
> for (uint32_t i = 0; i < perf_iters; i++) {
> ^
> ../app/test/test_service_cores.c:795:2: note: use option -std=c99 or
> -std=gnu99 to compile your code
Will fix in v2.
> > + 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;
> > }
> >
>
> - Can you look at Phil comments too?
Yes - will update to use padding at start of line in output.
V2 on the way.
More information about the dev
mailing list