[PATCH 1/3] sched/fair: Rename the 'has_blocked_load' local variable to 'has_blocked' in _nohz_idle_balance()
From: Ingo Molnar
Date: Tue Dec 02 2025 - 03:13:24 EST
There's three separate, independent pieces of logic in the
scheduler that are named 'has_blocked':
(1) nohz.has_blocked,
(2) rq->has_blocked_load - both of these relate to NOHZ balancing,
(3) and cfs_rq_has_blocked(), which operates on SMP load-balancing
averages.
To reduce confusion, split these 3 shared uses of 'has_blocked' name
patterns into 3 distinct and greppable patterns:
(1) nohz.has_blocked related functions and variables use
'has_blocked',
(2) rq->has_blocked_load related functions and variables use
'has_blocked_load',
(3) and cfs_rq_has_blocked() uses 'has_blocked_load_avg'.
This patch implements (1) and in _nohz_idle_balance() renames the
'has_blocked_load' local variable to 'has_blocked'.
No change in functionality.
Cc: Shrikanth Hegde <sshegde@xxxxxxxxxxxxx>
Cc: Peter Zijlstra <peterz@xxxxxxxxxxxxx>
Cc: Frederic Weisbecker <fweisbec@xxxxxxxxx>
Signed-off-by: Ingo Molnar <mingo@xxxxxxxxxx>
---
kernel/sched/fair.c | 8 ++++----
1 file changed, 4 insertions(+), 4 deletions(-)
diff --git a/kernel/sched/fair.c b/kernel/sched/fair.c
index ff647e92a314..3f21b77b59ce 100644
--- a/kernel/sched/fair.c
+++ b/kernel/sched/fair.c
@@ -12666,7 +12666,7 @@ static void _nohz_idle_balance(struct rq *this_rq, unsigned int flags)
/* Earliest time when we have to do rebalance again */
unsigned long now = jiffies;
unsigned long next_balance = now + 60*HZ;
- bool has_blocked_load = false;
+ bool has_blocked = false;
int update_next_balance = 0;
int this_cpu = this_rq->cpu;
int balance_cpu;
@@ -12710,7 +12710,7 @@ static void _nohz_idle_balance(struct rq *this_rq, unsigned int flags)
*/
if (!idle_cpu(this_cpu) && need_resched()) {
if (flags & NOHZ_STATS_KICK)
- has_blocked_load = true;
+ has_blocked = true;
if (flags & NOHZ_NEXT_KICK)
WRITE_ONCE(nohz.needs_update, 1);
goto abort;
@@ -12719,7 +12719,7 @@ static void _nohz_idle_balance(struct rq *this_rq, unsigned int flags)
rq = cpu_rq(balance_cpu);
if (flags & NOHZ_STATS_KICK)
- has_blocked_load |= update_nohz_stats(rq);
+ has_blocked |= update_nohz_stats(rq);
/*
* If time for next balance is due,
@@ -12756,7 +12756,7 @@ static void _nohz_idle_balance(struct rq *this_rq, unsigned int flags)
abort:
/* There is still blocked load, enable periodic update */
- if (has_blocked_load)
+ if (has_blocked)
WRITE_ONCE(nohz.has_blocked, 1);
}
--
2.51.0