TWx Linux Repository
Go to file
Vincent Guittot e37617c8e5 sched/fair: Fix frequency selection for non-invariant case
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
2024-01-16 10:41:25 +01:00
arch Scheduler changes for v6.8: 2024-01-08 19:49:17 -08:00
block vfs-6.8.super 2024-01-08 10:43:51 -08:00
certs
crypto
Documentation Scheduler changes for v6.8: 2024-01-08 19:49:17 -08:00
drivers Scheduler changes for v6.8: 2024-01-08 19:49:17 -08:00
fs vfs-6.8.iov_iter 2024-01-08 11:43:04 -08:00
include Scheduler changes for v6.8: 2024-01-08 19:49:17 -08:00
init
io_uring vfs-6.8.rw 2024-01-08 11:11:51 -08:00
ipc
kernel sched/fair: Fix frequency selection for non-invariant case 2024-01-16 10:41:25 +01:00
lib Debugobject changes for v6.8: 2024-01-08 18:35:33 -08:00
LICENSES
mm vfs-6.8.misc 2024-01-08 10:26:08 -08:00
net vfs-6.8.iov_iter 2024-01-08 11:43:04 -08:00
rust
samples
scripts
security vfs-6.8.iov_iter 2024-01-08 11:43:04 -08:00
sound ALSA: hda/realtek: Fix mute and mic-mute LEDs for HP ProBook 440 G6 2024-01-04 08:59:03 +01:00
tools Address a GCC-14 warning: there's no real bug, but indeed the calloc order doesn't match 2024-01-08 18:31:27 -08:00
usr
virt vfs-6.8.misc 2024-01-08 10:26:08 -08:00
.clang-format
.cocciconfig
.get_maintainer.ignore
.gitattributes
.gitignore
.mailmap 12 hotfixes. 2 are cc:stable and the remainder either address post-6.7 2024-01-05 13:46:18 -08:00
.rustfmt.toml
COPYING
CREDITS 12 hotfixes. 2 are cc:stable and the remainder either address post-6.7 2024-01-05 13:46:18 -08:00
Kbuild
Kconfig
MAINTAINERS Locking changes for v6.8: 2024-01-08 18:19:44 -08:00
Makefile Linux 6.7 2024-01-07 12:18:38 -08:00
README

Linux kernel
============

There are several guides for kernel developers and users. These guides can
be rendered in a number of formats, like HTML and PDF. Please read
Documentation/admin-guide/README.rst first.

In order to build the documentation, use ``make htmldocs`` or
``make pdfdocs``.  The formatted documentation can also be read online at:

    https://www.kernel.org/doc/html/latest/

There are various text files in the Documentation/ subdirectory,
several of them using the Restructured Text markup notation.

Please read the Documentation/process/changes.rst file, as it contains the
requirements for building and running the kernel, and information about
the problems which may result by upgrading your kernel.