Commit c56f97c5 authored by Yury Norov [NVIDIA]'s avatar Yury Norov [NVIDIA] Committed by Yury Norov
Browse files

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 3e061d92 ("lib/nodemask: optimize node_random for
nodemask with single NUMA node").

CC: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: default avatar"Yury Norov [NVIDIA]" <yury.norov@gmail.com>
parent 73392339
Loading
Loading
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please to comment