bitmap: rework bitmap_{bit,}remap()
Get series with b4
b4 am [email protected]Versions newest first
- v1 Latest12 patches 5 repliesIn review
Patches in v1 No applies recorded yet
Reviews trailers per patch
No Reviewed-by, Acked-by or Tested-by trailers for v1 yet.
Cover letter [PATCH 00/12] bitmap: rework bitmap_{bit,}remap()
This series adds a test, const-time optimizaton and fixes O(N^2) complexity problem for the functions. It's based on discussion in
bitmap: optimize bitmap_remap() series [1], but there's much more work here, so I decided to give it a separete run, and don't name it as v2.
bitmap_remap() API has just one user in generic code, and few more in drivers, so this may look like an overkill. But the work gives ~10x better performance for a 1000-bit bitmaps, which is typical for nodemasks in major distros like Ubuntu.
Anyways, the work is done, so guys please review.
[1] https://lore.kernel.org/lkml/[email protected]/T/
Yury Norov (12):
bitmap: add find_nth_bit_from()
bitmap: add bitmap_weight_from()
bitmap: add test for bitmap_remap()
bitmap: add test for bitmap_bitremap()
bitmap: update comment for bitmap_{bit,}remap()
bitmap: add small_cont_nbits() optimization for bitmap_remap()
bitmap: add small_const_nbits() optimization for bitmap_bitremap()
bitmap: optiimze bitmap_bitremap()
bitmap: optimize bitmap_remap() when 'new' is empty map
bitmap: separate handling of identity and remapping parts in
bitmap_remap()
bitmap: defer calculating weight of 'new' in bitmap_remap()
bitmap: don't count bits from the beginning in bitmap_remap()
include/linux/bitmap.h | 116 +++++++++++++++++++++++++++++++-- include/linux/find.h | 37 +++++++++++ lib/bitmap.c | 145 ++++++++++++++++++++--------------------- lib/find_bit.c | 29 +++++++++ lib/test_bitmap.c | 142 +++++++++++++++++++++++++++++++++++++++- 5 files changed, 388 insertions(+), 81 deletions(-)
Signature · 1 line
2.39.2