[PATCH 0/5] lib/find: optimize find_bit() functions

From: Yury Norov
Date: Thu Jul 28 2022 - 12:12:25 EST


In the recent discussion [1], it was noticed that find_next_bit()
functions may be improved by adding wrappers around common
__find_next_bit().

I tried that trick; and although it doesn't affect performance
significantly, as reported by find_bit_benchmark, there's ~2.5K
decrease in image size.

find_first_bit() is reworked accordingly.

[1] https://lkml.org/lkml/2022/7/25/830

Yury Norov (5):
lib/find_bit: rename le to need_swab in __find_next_bit()
lib/find_bit: optimize find_next_bit() functions
lib/find_bit: unify _find_first_{,and,zero}_bit implementations
lib/find_bit: create find_first_zero_bit_le()
lib/find_bit: re-use __find_first_bit() in __find_next_bit()

include/linux/find.h | 45 +++++++++----
lib/find_bit.c | 155 +++++++++++++++++++++++++++++--------------
2 files changed, 138 insertions(+), 62 deletions(-)

--
2.34.1