[PATCH 1/2] sched/topology: introduce node_has_cpus() macro
Valentin Schneider
vschneid at redhat.com
Thu Mar 16 03:48:12 AEDT 2023
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 at gmail.com>
Reviewed-by: Valentin Schneider <vschneid at redhat.com>
More information about the Linuxppc-dev
mailing list