From: Christian Loehle <christian.loehle@arm.com>
To: Avi Weiss <thnkslprpt@gmail.com>,
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: Re: [PATCH v2] cpufreq: schedutil: Skip busy-CPU hold when NOHZ is inactive
Date: Mon, 16 Nov 2026 10:38:17 +0000 [thread overview]
Message-ID: <4259f4df-3528-41c4-b3c2-51d7ec1d43d3@arm.com> (raw)
In-Reply-To: <20261108145028.2483131-2-thnkslprpt@gmail.com>
On 11/8/26 14:50, Avi Weiss wrote:
> 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>
Reviewed-by: Christian Loehle <christian.loehle@arm.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
next prev parent reply other threads:[~2026-11-16 10:38 UTC|newest]
Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-11-08 14:50 Avi Weiss
2026-11-13 18:21 ` Rafael J. Wysocki (Intel)
2026-11-16 9:27 ` Zhan Xusheng
2026-11-16 9:44 ` Zhongqiu Han
2026-11-16 10:38 ` Christian Loehle [this message]
2026-11-16 10:52 ` Vincent Guittot
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=4259f4df-3528-41c4-b3c2-51d7ec1d43d3@arm.com \
--to=christian.loehle@arm.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=thnkslprpt@gmail.com \
--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®