[PATCH v4 4/8] lib/string_kunit: add performance benchmark for strlen()

Andy Shevchenko andy.shevchenko at gmail.com
Mon Jan 26 01:28:47 PST 2026


On Mon, Jan 26, 2026 at 8:14 AM Feng Jiang <jiangfeng at kylinos.cn> wrote:
> On 2026/1/23 19:02, Andy Shevchenko wrote:
> > On Fri, Jan 23, 2026 at 04:58:37PM +0800, Feng Jiang wrote:

...

> >> +                    _bn_mbps = (u64)(buf_size) * _bn_iters * 1000;  \
> >
> > "KILO"? Or "(MEGA/KILO)"? I'm puzzled with this 1000 multiplier.
>
> The 1000 factor converts bytes/ns to MB/s:
>   (bytes/ns) * (10^9 ns/s) / (10^6 bytes/MB)
> In v5, I will replace it with (NSEC_PER_SEC / MEGA) to make the unit
> conversion explicit and avoid confusion.

Or NSEC_PER_USEC. Whatever, choose the one you think fits best.

-- 
With Best Regards,
Andy Shevchenko



More information about the linux-riscv mailing list