[PATCH 0/6] sbitmap: fix offset hint wrap and some optimizations

From: chengming . zhou
Date: Thu Jul 20 2023 - 05:49:05 EST


From: Chengming Zhou <zhouchengming@xxxxxxxxxxxxx>

Hello,

This series aim to fix and simplify the offset hint wrap logic, also
include some minor optimizations.

patch 01,02 fix offset hint wrap logic in strict round-robin mode.

patch 03,04 simplify the sbitmap_find_bit() code by removing wrap logic.

patch 05,06 are two minor optimizations.

Thanks!

Chengming Zhou (6):
sbitmap: fix hint wrap in the failure case
sbitmap: fix round-robin non-wrap find with hint > 0
sbitmap: don't loop twice in find_next_zero_bit()
sbitmap: remove offset wrap logic when finding bit in word
sbitmap: wake_index doesn't need to be atomic_t
sbitmap: check ws_active before check waitqueues

include/linux/sbitmap.h | 2 +-
lib/sbitmap.c | 66 ++++++++++++++++++++---------------------
2 files changed, 33 insertions(+), 35 deletions(-)

--
2.41.0