]> git.droids-corp.org - dpdk.git/commit
mempool: test performance with constant n
authorMorten Brørup <mb@smartsharesystems.com>
Mon, 24 Jan 2022 14:59:53 +0000 (15:59 +0100)
committerThomas Monjalon <thomas@monjalon.net>
Wed, 2 Feb 2022 21:06:14 +0000 (22:06 +0100)
commited579e50c66db90485593c6c79f5366a57145f2a
treef15efb86c549b855ed9069e35dd692a651640fe8
parent08c724b3276725549e4426f15be206d1b688795b
mempool: test performance with constant n

"What gets measured gets done."

This patch adds mempool performance tests where the number of objects to
put and get is constant at compile time, which may significantly improve
the performance of these functions. [*]

Also, it is ensured that the array holding the object used for testing
is cache line aligned, for maximum performance.

And finally, the following entries are added to the list of tests:
- Number of kept objects: 512
- Number of objects to get and to put: The number of pointers fitting
  into a cache line, i.e. 8 or 16

[*] Some example performance test (with cache) results:

get_bulk=4 put_bulk=4 keep=128 constant_n=false rate_persec=280480972
get_bulk=4 put_bulk=4 keep=128 constant_n=true  rate_persec=622159462

get_bulk=8 put_bulk=8 keep=128 constant_n=false rate_persec=477967155
get_bulk=8 put_bulk=8 keep=128 constant_n=true  rate_persec=917582643

get_bulk=32 put_bulk=32 keep=32 constant_n=false rate_persec=871248691
get_bulk=32 put_bulk=32 keep=32 constant_n=true rate_persec=1134021836

Signed-off-by: Morten Brørup <mb@smartsharesystems.com>
Signed-off-by: Olivier Matz <olivier.matz@6wind.com>
app/test/test_mempool_perf.c