From: Avi Weiss <thnkslprpt@gmail.com>
To: rafael@kernel.org, viresh.kumar@linaro.org
Cc: mingo@redhat.com, peterz@infradead.org, juri.lelli@redhat.com,
vincent.guittot@linaro.org, zhanxusheng1024@gmail.com,
zhongqiu.han@oss.qualcomm.com, linux-pm@vger.kernel.org,
linux-kernel@vger.kernel.org
Subject: [PATCH v2] cpufreq: schedutil: Skip busy-CPU hold when NOHZ is inactive
Date: Sun, 8 Nov 2026 16:50:28 +0200 [thread overview]
Message-ID: <20261108145028.2483131-2-thnkslprpt@gmail.com> (raw)
sugov_hold_freq() uses the NOHZ idle-call counter to determine whether
a CPU has been idle recently. When NOHZ is disabled or fails to
activate, the counter does not advance, causing schedutil to treat
the CPU as continuously busy and potentially prevent frequency
reductions.
Skip the busy-CPU hold when tick_nohz_is_active() is false. This
also handles systems where NOHZ was enabled but never activated.
Fixes: b7eaf1aab9f8 ("cpufreq: schedutil: Avoid reducing frequency of busy CPUs prematurely")
Cc: stable@vger.kernel.org
Signed-off-by: Avi Weiss <thnkslprpt@gmail.com>
---
v2:
- use tick_nohz_is_active() instead of tick_nohz_enabled to also
handle NOHZ enabled but never activated, as suggested by Zhan Xusheng
kernel/sched/cpufreq_schedutil.c | 3 +++
1 file changed, 3 insertions(+)
diff --git a/kernel/sched/cpufreq_schedutil.c b/kernel/sched/cpufreq_schedutil.c
index 14405a614991..50249cc1a594 100644
--- a/kernel/sched/cpufreq_schedutil.c
+++ b/kernel/sched/cpufreq_schedutil.c
@@ -397,6 +397,9 @@ static bool sugov_hold_freq(struct sugov_cpu *sg_cpu)
if (uclamp_rq_is_capped(cpu_rq(sg_cpu->cpu)))
return false;
+ if (!tick_nohz_is_active())
+ return false;
+
/*
* Maintain the frequency if the CPU has not been idle recently, as
* reduction is likely to be premature.
base-commit: fa4ad798f6f681031775266044ba1b0cf3c670bd
--
2.43.0
reply other threads:[~2026-11-08 14:50 UTC|newest]
Thread overview: [no followups] expand[flat|nested] mbox.gz Atom feed
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=20261108145028.2483131-2-thnkslprpt@gmail.com \
--to=thnkslprpt@gmail.com \
--cc=juri.lelli@redhat.com \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-pm@vger.kernel.org \
--cc=mingo@redhat.com \
--cc=peterz@infradead.org \
--cc=rafael@kernel.org \
--cc=vincent.guittot@linaro.org \
--cc=viresh.kumar@linaro.org \
--cc=zhanxusheng1024@gmail.com \
--cc=zhongqiu.han@oss.qualcomm.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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox
all inboxes | Powered by JetHome®