Thread (33 messages) 33 messages, 9 authors, 2021-12-15

Re: [PATCH 3/9] all: replace bitmap_weigth() with bitmap_{empty,full,eq,gt,le}

From: Michał Mirosław <mirq-linux@rere.qmqm.pl>
Date: 2021-11-28 04:49:53
Also in: kvm, linux-alpha, linux-arm-kernel, linux-crypto, linux-mips, linux-mm, linux-riscv, linux-s390, linuxppc-dev, lkml

On Sat, Nov 27, 2021 at 07:56:58PM -0800, Yury Norov wrote:
bitmap_weight() counts all set bits in the bitmap unconditionally.
However in some cases we can traverse a part of bitmap when we
only need to check if number of set bits is greater, less or equal
to some number.

This patch replaces bitmap_weight() with one of
bitmap_{empty,full,eq,gt,le), as appropriate.

In some places driver code has been optimized further, where it's
trivial.
[...]

I think this patch needs to be split. bitmap_full/empty() conversions
can be separated (don't need the bitmap_weight_*() functions) and
not all changes are trivial. Besides, gathering and checking all the
acks needed into one patch seems problematic.

Best Regards,
Michał Mirosław
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help