[PATCH v4 0/3] bitmap: introduce find_random_bit() and use in clocksource
From: Yury Norov
Date: Thu Jun 19 2025 - 14:27:58 EST
nodemasks implement node_random(), which may also be useful for other
subsystems. Generalize the function, and propagate to cpumask API.
v1: https://lore.kernel.org/all/20250604212125.25656-1-yury.norov@xxxxxxxxx/
v2: https://lore.kernel.org/all/20250608194536.28130-1-yury.norov@xxxxxxxxx/
v3: https://lore.kernel.org/all/20250617200854.60753-1-yury.norov@xxxxxxxxx/
v4: return NUMA_NO_NODES instead of MAX_NUMNODES in node_random() (Andrew)
Yury Norov [NVIDIA] (3):
bitmap: generalize node_random()
cpumask: introduce cpumask_random()
clocksource: Improve randomness in clocksource_verify_choose_cpus()
include/linux/cpumask.h | 12 ++++++++++++
include/linux/find.h | 2 ++
include/linux/nodemask.h | 18 +++---------------
kernel/time/clocksource.c | 5 +----
lib/find_bit.c | 24 ++++++++++++++++++++++++
5 files changed, 42 insertions(+), 19 deletions(-)
--
2.43.0