[PATCH] sched/fair: Fix stale comments around nohz.nr_cpus

From: Shrikanth Hegde

Date: Mon Mar 23 2026 - 01:30:19 EST


nohz.nr_cpus has been removed. Update those stale comments around it.

Fixes: 5d86d542f68f ("sched/fair: Remove nohz.nr_cpus and use weight of cpumask instead")
Signed-off-by: Shrikanth Hegde <sshegde@xxxxxxxxxxxxx>
---
Broke it off from v1, since that would need a larger rework.
v1: https://lore.kernel.org/all/20260319065314.343932-1-sshegde@xxxxxxxxxxxxx/

kernel/sched/fair.c | 5 +++--
1 file changed, 3 insertions(+), 2 deletions(-)

diff --git a/kernel/sched/fair.c b/kernel/sched/fair.c
index b19aeaa51ebc..a24a7cf0fc1d 100644
--- a/kernel/sched/fair.c
+++ b/kernel/sched/fair.c
@@ -12720,13 +12720,14 @@ static void nohz_balancer_kick(struct rq *rq)
flags = NOHZ_STATS_KICK;

/*
- * Most of the time system is not 100% busy. i.e nohz.nr_cpus > 0
+ * Most of the time system is not 100% busy. i.e number of CPUs in
+ * nohz.idle_cpus_mask > 0
* Skip the read if time is not due.
*
* If none are in tickless mode, there maybe a narrow window
* (28 jiffies, HZ=1000) where flags maybe set and kick_ilb called.
* But idle load balancing is not done as find_new_ilb fails.
- * That's very rare. So read nohz.nr_cpus only if time is due.
+ * That's very rare. So read nohz.idle_cpus_mask only if time is due.
*/
if (time_before(now, nohz.next_balance))
goto out;
--
2.47.3