public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
* [PATCH v4 0/8] bitmap: cleanup bitmap_*_region() implementation
@ 2023-08-29  2:39 Yury Norov
  2023-08-29  2:39 ` [PATCH v4 1/8] bitmap: align __reg_op() wrappers with modern coding style Yury Norov
                   ` (7 more replies)
  0 siblings, 8 replies; 14+ messages in thread
From: Yury Norov @ 2023-08-29  2:39 UTC (permalink / raw)
  To: linux-kernel; +Cc: Yury Norov, Andy Shevchenko, Rasmus Villemoes

bitmap_{allocate,find_free,release}_region() functions are implemented
on top of _reg_op() machinery. It duplicates existing generic functionality
with no benefits. In fact, generic alternatives may work even better
because they optimized for small_const_nbits() case and overall very well
optimized for performance and code generation.

This series drops _reg_op() entirely.

v2: https://lore.kernel.org/lkml/20230811005732.107718-2-yury.norov@gmail.com/T/
v3: https://lore.kernel.org/lkml/20230815233628.45016-2-yury.norov@gmail.com/T/
v4: address nits for v3.

Yury Norov (8):
  bitmap: align __reg_op() wrappers with modern coding style
  bitmap: add test for bitmap_*_regoon() functions
  bitmap: fix opencoded bitmap_allocate_region()
  bitmap: replace _reg_op(REG_OP_ALLOC) with bitmap_set()
  bitmap: replace _reg_op(REG_OP_RELEASE) with bitmap_clear()
  bitmap: replace _reg_op(REG_OP_ISFREE) with find_next_bit()
  bitmap: drop _reg_op() function
  bitmap: move bitmap_*_region functions to bitmap.h

 include/linux/bitmap.h |  63 ++++++++++++++++++-
 lib/bitmap.c           | 140 -----------------------------------------
 lib/test_bitmap.c      |  24 +++++++
 3 files changed, 84 insertions(+), 143 deletions(-)

-- 
2.39.2


^ permalink raw reply	[flat|nested] 14+ messages in thread

end of thread, other threads:[~2023-08-29 15:45 UTC | newest]

Thread overview: 14+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2023-08-29  2:39 [PATCH v4 0/8] bitmap: cleanup bitmap_*_region() implementation Yury Norov
2023-08-29  2:39 ` [PATCH v4 1/8] bitmap: align __reg_op() wrappers with modern coding style Yury Norov
2023-08-29 15:26   ` Andy Shevchenko
2023-08-29  2:39 ` [PATCH v4 2/8] bitmap: add test for bitmap_*_region() functions Yury Norov
2023-08-29 15:29   ` Andy Shevchenko
2023-08-29  2:39 ` [PATCH v4 3/8] bitmap: fix opencoded bitmap_allocate_region() Yury Norov
2023-08-29 15:30   ` Andy Shevchenko
2023-08-29  2:39 ` [PATCH v4 4/8] bitmap: replace _reg_op(REG_OP_ALLOC) with bitmap_set() Yury Norov
2023-08-29  2:39 ` [PATCH v4 5/8] bitmap: replace _reg_op(REG_OP_RELEASE) with bitmap_clear() Yury Norov
2023-08-29 15:32   ` Andy Shevchenko
2023-08-29  2:39 ` [PATCH v4 6/8] bitmap: replace _reg_op(REG_OP_ISFREE) with find_next_bit() Yury Norov
2023-08-29  2:39 ` [PATCH v4 7/8] bitmap: drop _reg_op() function Yury Norov
2023-08-29  2:39 ` [PATCH v4 8/8] bitmap: move bitmap_*_region() functions to bitmap.h Yury Norov
2023-08-29 10:07   ` Yury Norov

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox