Re: [patch V4 09/20] cpumask: Cache num_possible_cpus()
From: Mathieu Desnoyers
Date: Mon Nov 17 2025 - 11:56:38 EST
On 2025-11-16 15:48, Thomas Gleixner wrote:
Reevaluating num_possible_cpus() over and over does not make sense. That
becomes a constant after init as cpu_possible_mask is marked ro_after_init.
Cache the value during initialization and provide that for consumption.
Signed-off-by: Thomas Gleixner <tglx@xxxxxxxxxxxxx>
Reviewed-by: Yury Norov <yury.norov@xxxxxxxxx>
Reviewed-by: Mathieu Desnoyers <mathieu.desnoyers@xxxxxxxxxxxx>
--
Mathieu Desnoyers
EfficiOS Inc.
https://www.efficios.com