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

From: Jens Axboe
Date: Mon Oct 31 2022 - 09:27:23 EST


On Sun, 30 Oct 2022 13:20:08 +0800, 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.
>
> 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.
>
> [...]

Applied, thanks!

[1/1] block: simplify blksize_bits() implementation
commit: adff215830fcf3ef74f2f0d4dd5a47a6927d450b

Best regards,
--
Jens Axboe