Re: [patch V4 09/20] cpumask: Cache num_possible_cpus()
From: Shrikanth Hegde
Date: Mon Nov 17 2025 - 23:40:46 EST
On 11/17/25 2:18 AM, 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: Shrikanth Hegde <sshegde@xxxxxxxxxxxxx>