From: Ingo Molnar <mingo@kernel.org>
To: linux-kernel@vger.kernel.org
Cc: Peter Zijlstra <peterz@infradead.org>,
Frederic Weisbecker <frederic@kernel.org>,
Shrikanth Hegde <sshegde@linux.ibm.com>,
Juri Lelli <juri.lelli@redhat.com>,
Dietmar Eggemann <dietmar.eggemann@arm.com>,
Valentin Schneider <vschneid@redhat.com>,
Vincent Guittot <vincent.guittot@linaro.org>,
Linus Torvalds <torvalds@linux-foundation.org>,
Mel Gorman <mgorman@suse.de>,
Steven Rostedt <rostedt@goodmis.org>,
Thomas Gleixner <tglx@linutronix.de>,
Ingo Molnar <mingo@kernel.org>,
Frederic Weisbecker <fweisbec@gmail.com>
Subject: [PATCH 1/3] sched/fair: Rename the 'has_blocked_load' local variable to 'has_blocked' in _nohz_idle_balance()
Date: Tue, 2 Dec 2025 09:13:02 +0100 [thread overview]
Message-ID: <20251202081304.3103393-2-mingo@kernel.org> (raw)
In-Reply-To: <20251202081304.3103393-1-mingo@kernel.org>
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@linux.ibm.com>
Cc: Peter Zijlstra <peterz@infradead.org>
Cc: Frederic Weisbecker <fweisbec@gmail.com>
Signed-off-by: Ingo Molnar <mingo@kernel.org>
---
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
next prev parent reply other threads:[~2025-12-02 8:13 UTC|newest]
Thread overview: 12+ messages / expand[flat|nested] mbox.gz Atom feed top
2025-12-02 8:13 [PATCH 0/3] sched/fair: Sort out 'blocked_load*' namespace confusion Ingo Molnar
2025-12-02 8:13 ` Ingo Molnar [this message]
2025-12-02 8:13 ` [PATCH 2/3] sched/fair: Rename the 'has_blocked' parameter in update_blocked_load_status() to 'has_blocked_load' Ingo Molnar
2025-12-02 8:13 ` [PATCH 3/3] sched/fair: Rename cfs_rq_has_blocked() => cfs_rq_has_blocked_load_avg() Ingo Molnar
2025-12-02 9:04 ` [PATCH 0/3] sched/fair: Sort out 'blocked_load*' namespace confusion Vincent Guittot
2025-12-02 9:34 ` [PATCH 1/1 -v2] sched/fair: Sort out 'blocked_load*' namespace noise Ingo Molnar
2025-12-02 10:13 ` Vincent Guittot
2025-12-02 16:09 ` [PATCH 1/1 -v3] " Ingo Molnar
2025-12-02 16:55 ` Vincent Guittot
2025-12-02 20:26 ` Shrikanth Hegde
2025-12-14 7:46 ` [tip: sched/core] " tip-bot2 for Ingo Molnar
2025-12-15 7:59 ` tip-bot2 for Ingo Molnar
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20251202081304.3103393-2-mingo@kernel.org \
--to=mingo@kernel.org \
--cc=dietmar.eggemann@arm.com \
--cc=frederic@kernel.org \
--cc=fweisbec@gmail.com \
--cc=juri.lelli@redhat.com \
--cc=linux-kernel@vger.kernel.org \
--cc=mgorman@suse.de \
--cc=peterz@infradead.org \
--cc=rostedt@goodmis.org \
--cc=sshegde@linux.ibm.com \
--cc=tglx@linutronix.de \
--cc=torvalds@linux-foundation.org \
--cc=vincent.guittot@linaro.org \
--cc=vschneid@redhat.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.