Re: [PATCH 1/2] sched/topology: introduce node_has_cpus() macro

From: Valentin Schneider
Date: Wed Mar 15 2023 - 12:49:22 EST


On 21/02/23 18:50, Yury Norov wrote:
> Currently, to check if NUMA node has CPUs, one has to use the
> nr_cpus_node() macro, which ends up with cpumask_weight. We can do it
> better with cpumask_empty(), because the latter can potentially return
> earlier - as soon as 1st set bit found.
>
> This patch adds a node_has_cpus() macro to implement that.
>
> Signed-off-by: Yury Norov <yury.norov@xxxxxxxxx>

Reviewed-by: Valentin Schneider <vschneid@xxxxxxxxxx>