* [PATCH v2] cpufreq: schedutil: Skip busy-CPU hold when NOHZ is inactive
@ 2026-11-08 14:50 Avi Weiss
0 siblings, 0 replies; only message in thread
From: Avi Weiss @ 2026-11-08 14:50 UTC (permalink / raw)
To: rafael, viresh.kumar
Cc: mingo, peterz, juri.lelli, vincent.guittot, zhanxusheng1024,
zhongqiu.han, linux-pm, linux-kernel
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
^ permalink raw reply [flat|nested] only message in thread
only message in thread, other threads:[~2026-11-08 14:50 UTC | newest]
Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2026-11-08 14:50 [PATCH v2] cpufreq: schedutil: Skip busy-CPU hold when NOHZ is inactive Avi Weiss
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®