From: Greg KH <gregkh@linuxfoundation.org>
To: Wentao Guan <guanwentao@uniontech.com>
Cc: stable@vger.kernel.org,
Vincent Guittot <vincent.guittot@linaro.org>,
Linus Torvalds <torvalds@linux-foundation.org>,
Wyes Karny <wkarny@gmail.com>, Ingo Molnar <mingo@kernel.org>
Subject: Re: [PATCH 6.6 8/8] sched/fair: Fix frequency selection for non-invariant case
Date: Fri, 22 Aug 2025 11:04:07 +0200 [thread overview]
Message-ID: <2025082258-starfish-crunching-77ba@gregkh> (raw)
In-Reply-To: <20250815181618.3199442-9-guanwentao@uniontech.com>
On Sat, Aug 16, 2025 at 02:16:18AM +0800, Wentao Guan wrote:
> From: Vincent Guittot <vincent.guittot@linaro.org>
>
> Linus reported a ~50% performance regression on single-threaded
> workloads on his AMD Ryzen system, and bisected it to:
>
> 9c0b4bb7f630 ("sched/cpufreq: Rework schedutil governor performance estimation")
>
> When frequency invariance is not enabled, get_capacity_ref_freq(policy)
> is supposed to return the current frequency and the performance margin
> applied by map_util_perf(), enabling the utilization to go above the
> maximum compute capacity and to select a higher frequency than the current one.
>
> After the changes in 9c0b4bb7f630, the performance margin was applied
> earlier in the path to take into account utilization clampings and
> we couldn't get a utilization higher than the maximum compute capacity,
> and the CPU remained 'stuck' at lower frequencies.
>
> To fix this, we must use a frequency above the current frequency to
> get a chance to select a higher OPP when the current one becomes fully used.
> Apply the same margin and return a frequency 25% higher than the current
> one in order to switch to the next OPP before we fully use the CPU
> at the current one.
>
> [ mingo: Clarified the changelog. ]
>
> Fixes: 9c0b4bb7f630 ("sched/cpufreq: Rework schedutil governor performance estimation")
> Reported-by: Linus Torvalds <torvalds@linux-foundation.org>
> Bisected-by: Linus Torvalds <torvalds@linux-foundation.org>
> Reported-by: Wyes Karny <wkarny@gmail.com>
> Signed-off-by: Vincent Guittot <vincent.guittot@linaro.org>
> Signed-off-by: Ingo Molnar <mingo@kernel.org>
> Tested-by: Wyes Karny <wkarny@gmail.com>
> Link: https://lore.kernel.org/r/20240114183600.135316-1-vincent.guittot@linaro.org
> (cherry picked from commit e37617c8e53a1f7fcba6d5e1041f4fd8a2425c27)
> ---
> kernel/sched/cpufreq_schedutil.c | 6 +++++-
> 1 file changed, 5 insertions(+), 1 deletion(-)
You forgot to sign off on this one :(
next prev parent reply other threads:[~2025-08-22 9:04 UTC|newest]
Thread overview: 13+ messages / expand[flat|nested] mbox.gz Atom feed top
2025-08-15 18:16 [PATCH 6.6 0/8] Backport sched/schedutil fixes and depend patch series Wentao Guan
2025-08-15 18:16 ` [PATCH 6.6 1/8] sched/topology: Add a new arch_scale_freq_ref() method Wentao Guan
2025-08-15 18:16 ` [PATCH 6.6 2/8] cpufreq: Use the fixed and coherent frequency for scaling capacity Wentao Guan
2025-08-15 18:16 ` [PATCH 6.6 3/8] cpufreq/schedutil: Use a fixed reference frequency Wentao Guan
2025-08-15 18:16 ` [PATCH 6.6 4/8] energy_model: " Wentao Guan
2025-08-15 18:16 ` [PATCH 6.6 5/8] cpufreq/cppc: Set the frequency used for computing the capacity Wentao Guan
2025-08-15 18:16 ` [PATCH 6.6 6/8] arm64/amu: Use capacity_ref_freq() to set AMU ratio Wentao Guan
2025-08-15 18:16 ` [PATCH 6.6 7/8] topology: Set capacity_freq_ref in all cases Wentao Guan
2025-08-15 18:16 ` [PATCH 6.6 8/8] sched/fair: Fix frequency selection for non-invariant case Wentao Guan
2025-08-22 9:04 ` Greg KH [this message]
2025-08-22 9:10 ` Wentao Guan
2025-08-22 9:22 ` Greg KH
2025-08-31 6:03 ` Zenm Chen
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=2025082258-starfish-crunching-77ba@gregkh \
--to=gregkh@linuxfoundation.org \
--cc=guanwentao@uniontech.com \
--cc=mingo@kernel.org \
--cc=stable@vger.kernel.org \
--cc=torvalds@linux-foundation.org \
--cc=vincent.guittot@linaro.org \
--cc=wkarny@gmail.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