mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
* [PATCH] cpufreq: schedutil: Skip busy-CPU hold when NOHZ is disabled
@ 2026-11-03  6:15 Avi Weiss
  2026-11-03  7:17 ` Zhan Xusheng
  0 siblings, 1 reply; 3+ messages in thread
From: Avi Weiss @ 2026-11-03  6:15 UTC (permalink / raw)
  To: rafael, viresh.kumar; +Cc: linux-pm, linux-kernel, Avi Weiss

With nohz=off, tick_nohz_idle_stop_tick() can return without
incrementing idle_calls. sugov_hold_freq() then treats an unchanged
counter as continuous CPU activity and can prevent frequency reductions
even after the CPU has been idle.

Skip the busy-CPU hold heuristic when NOHZ is disabled.

Fixes: b7eaf1aab9f8 ("cpufreq: schedutil: Avoid reducing frequency of busy CPUs prematurely")
Signed-off-by: Avi Weiss <thnkslprpt@gmail.com>
---
 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..111582876954 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_enabled)
+		return false;
+
 	/*
 	 * Maintain the frequency if the CPU has not been idle recently, as
 	 * reduction is likely to be premature.

base-commit: 6628e7d4c6b25c8d18f1345e3a20d21829aae7e4
-- 
2.53.0


^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2026-11-03 11:03 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2026-11-03  6:15 [PATCH] cpufreq: schedutil: Skip busy-CPU hold when NOHZ is disabled Avi Weiss
2026-11-03  7:17 ` Zhan Xusheng
2026-11-03 11:03   ` Zhongqiu Han

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®