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

Shrikanth Hegde posted 1 patch 1 week, 4 days ago
kernel/sched/fair.c | 5 +++--
1 file changed, 3 insertions(+), 2 deletions(-)
[PATCH] sched/fair: Fix stale comments around nohz.nr_cpus
Posted by Shrikanth Hegde 1 week, 4 days ago
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@linux.ibm.com>
---
Broke it off from v1, since that would need a larger rework.
v1: https://lore.kernel.org/all/20260319065314.343932-1-sshegde@linux.ibm.com/

 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
Re: [PATCH] sched/fair: Fix stale comments around nohz.nr_cpus
Posted by Valentin Schneider 1 week ago
On 23/03/26 10:59, Shrikanth Hegde wrote:
> 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")

Not sure the Fixes: tag is warranted considering it doesn't affect the
compiled output.

> Signed-off-by: Shrikanth Hegde <sshegde@linux.ibm.com>

Reviewed-by: Valentin Schneider <vschneid@redhat.com>