[PATCH v2 4/4] mempool perf test: test random bulk sizes

Morten Brørup mb at smartsharesystems.com
Wed Apr 2 11:07:59 CEST 2025


> From: Andrew Rybchenko [mailto:andrew.rybchenko at oktetlabs.ru]
> Sent: Monday, 31 March 2025 16.49
> 
> On 3/31/25 13:03, Morten Brørup wrote:
> > Bulk requests to get or put objects in a mempool often vary in size.
> > A series of tests with pseudo random request sizes, to mitigate the
> > benefits of the CPU's dynamic branch predictor, was added.
> >
> > Signed-off-by: Morten Brørup <mb at smartsharesystems.com>
> > Acked-by: Andrew Rybchenko <andrew.rybchenko at oktetlabs.ru>
> 
> [snip]
> 
> > @@ -181,9 +240,9 @@ per_lcore_mempool_test(void *arg)
> >   	}
> >
> >   	/* n_get_bulk and n_put_bulk must be divisors of n_keep */
> > -	if (((n_keep / n_get_bulk) * n_get_bulk) != n_keep)
> > +	if (!n_max_bulk && (((n_keep / n_get_bulk) * n_get_bulk) !=
> n_keep))
> 
> IMHO n_max_bulk == 0 would be easier to read and as far as I remember
> DPDK coding style recommends the same style.

Good catches. All fixed in v3.

Thank you for the detailed review, Andrew.



More information about the dev mailing list