Files
linux/lib/find_bit.c
Yury Norov [NVIDIA] c56f97c5c7 bitmap: generalize node_random()
Generalize node_random() and make it available to general bitmaps and
cpumasks users.

Notice, find_first_bit() is generally faster than find_nth_bit(), and we
employ it when there's a single set bit in the bitmap.

See commit 3e061d924f ("lib/nodemask: optimize node_random for
nodemask with single NUMA node").

CC: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: "Yury Norov [NVIDIA]" <yury.norov@gmail.com>
2025-07-08 19:11:57 -04:00

8.4 KiB