Re: [PATCH v3] block: simplify blksize_bits() implementation

From: Chaitanya Kulkarni
Date: Sun Oct 30 2022 - 22:03:59 EST


On 10/29/2022 10:20 PM, Dawei Li wrote:
> Convert current looping-based implementation into bit operation,
> which can bring improvement for:
>
> 1) bitops is more efficient for its arch-level optimization.
>

do you have a quantitative date to prove that ?
Also which arch benefits the most ? is it true for all ?

> 2) Given that blksize_bits() is inline, _if_ @size is compile-time
> constant, it's possible that order_base_2() _may_ make output
> compile-time evaluated, depending on code context and compiler behavior.
>

patches like this needs to be supported by the quantitative
data, else I've seen reviewers taking an objection ...

either way :-

Reviewed-by: Chaitanya Kulkarni <kch@xxxxxxxxxx>

-ck