diff options
| author | Dawei Li <[email protected]> | 2022-10-30 13:20:08 +0800 |
|---|---|---|
| committer | Jens Axboe <[email protected]> | 2022-10-31 07:26:27 -0600 |
| commit | adff215830fcf3ef74f2f0d4dd5a47a6927d450b (patch) | |
| tree | 1e00cfc3a9df9f40146a5b34dfa492a097437223 /tools/perf/scripts/python | |
| parent | 82c229476b8f6afd7e09bc4dc77d89dc19ff7688 (diff) | |
block: simplify blksize_bits() implementation
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.
Signed-off-by: Dawei Li <[email protected]>
Reviewed-by: Bart Van Assche <[email protected]>
Reviewed-by: Chaitanya Kulkarni <[email protected]>
Reviewed-by: Christoph Hellwig <[email protected]>
Link: https://lore.kernel.org/r/TYCP286MB23238842958D7C083D6B67CECA349@TYCP286MB2323.JPNP286.PROD.OUTLOOK.COM
Signed-off-by: Jens Axboe <[email protected]>
Diffstat (limited to 'tools/perf/scripts/python')
0 files changed, 0 insertions, 0 deletions