From 57ddcc014bbfb9084f068e67dde84cf73c383068 Mon Sep 17 00:00:00 2001 From: Yury Norov Date: Sun, 30 Apr 2023 10:18:07 -0700 Subject: [PATCH] lib/cpumask: update comment to cpumask_local_spread() Now that we have a for_each_numa_online_cpu(), which is a more straightforward replacement to the cpumask_local_spread() when it comes to enumeration of CPUs with respect to NUMA topology, it's worth to update the comment. Signed-off-by: Yury Norov --- lib/cpumask.c | 7 ++----- 1 file changed, 2 insertions(+), 5 deletions(-) diff --git a/lib/cpumask.c b/lib/cpumask.c index a7fd02b5ae264..357b68be526b1 100644 --- a/lib/cpumask.c +++ b/lib/cpumask.c @@ -128,11 +128,8 @@ void __init free_bootmem_cpumask_var(cpumask_var_t mask) * * There's a better alternative based on for_each()-like iterators: * - * for_each_numa_hop_mask(mask, node) { - * for_each_cpu_andnot(cpu, mask, prev) - * do_something(cpu); - * prev = mask; - * } + * for_each_numa_online_cpu(cpu, hop, node) + * do_something(cpu); * * It's simpler and more verbose than above. Complexity of iterator-based * enumeration is O(sched_domains_numa_levels * nr_cpu_ids), while