twx-linux/include
Vincent Guittot ada8d7fa0a sched/cpufreq: Rework schedutil governor performance estimation
[ Upstream commit 9c0b4bb7f6303c9c4e2e34984c46f5a86478f84d ]

The current method to take into account uclamp hints when estimating the
target frequency can end in a situation where the selected target
frequency is finally higher than uclamp hints, whereas there are no real
needs. Such cases mainly happen because we are currently mixing the
traditional scheduler utilization signal with the uclamp performance
hints. By adding these 2 metrics, we loose an important information when
it comes to select the target frequency, and we have to make some
assumptions which can't fit all cases.

Rework the interface between the scheduler and schedutil governor in order
to propagate all information down to the cpufreq governor.

effective_cpu_util() interface changes and now returns the actual
utilization of the CPU with 2 optional inputs:

- The minimum performance for this CPU; typically the capacity to handle
  the deadline task and the interrupt pressure. But also uclamp_min
  request when available.

- The maximum targeting performance for this CPU which reflects the
  maximum level that we would like to not exceed. By default it will be
  the CPU capacity but can be reduced because of some performance hints
  set with uclamp. The value can be lower than actual utilization and/or
  min performance level.

A new sugov_effective_cpu_perf() interface is also available to compute
the final performance level that is targeted for the CPU, after applying
some cpufreq headroom and taking into account all inputs.

With these 2 functions, schedutil is now able to decide when it must go
above uclamp hints. It now also has a generic way to get the min
performance level.

The dependency between energy model and cpufreq governor and its headroom
policy doesn't exist anymore.

eenv_pd_max_util() asks schedutil for the targeted performance after
applying the impact of the waking task.

[ mingo: Refined the changelog & C comments. ]

Signed-off-by: Vincent Guittot <vincent.guittot@linaro.org>
Signed-off-by: Ingo Molnar <mingo@kernel.org>
Acked-by: Rafael J. Wysocki <rafael@kernel.org>
Link: https://lore.kernel.org/r/20231122133904.446032-2-vincent.guittot@linaro.org
Stable-dep-of: 79443a7e9da3 ("cpufreq/sched: Explicitly synchronize limits_changed flag handling")
Signed-off-by: Sasha Levin <sashal@kernel.org>
2025-05-02 07:50:41 +02:00
..
acpi LoongArch: Fix warnings during S3 suspend 2025-02-08 09:52:27 +01:00
asm-generic mm: hugetlb: Add huge page size param to huge_ptep_get_and_clear() 2025-03-13 12:58:38 +01:00
clocksource x86/hyperv: Fix hv tsc page based sched_clock for hibernation 2025-01-10 14:31:36 +01:00
crypto crypto: ecc - Prevent ecc_digits_from_bytes from reading too many bytes 2025-01-09 13:31:52 +01:00
drm drm/tests: helpers: Create kunit helper to destroy a drm_display_mode 2025-04-25 10:45:08 +02:00
dt-bindings dt-bindings: clock: sunxi: Export PLL_VIDEO_2X and PLL_MIPI 2025-02-08 09:51:55 +01:00
keys
kunit
kvm
linux sched/cpufreq: Rework schedutil governor performance estimation 2025-05-02 07:50:41 +02:00
math-emu
media media: subdev: Add v4l2_subdev_is_streaming() 2025-05-02 07:50:37 +02:00
memory
misc
net xdp: Reset bpf_redirect_info before running a xdp's BPF prog. 2025-04-25 10:45:57 +02:00
pcmcia
ras
rdma RDMA/core: Don't expose hw_counters outside of init net namespace 2025-04-10 14:37:30 +02:00
rv rv: Reset per-task monitors also for idle tasks 2025-02-17 09:40:32 +01:00
scsi scsi: Remove scsi device no_start_on_resume flag 2024-10-17 15:24:11 +02:00
soc soc: qcom: ice: introduce devm_of_qcom_ice_get 2025-05-02 07:50:37 +02:00
sound ASoC: ops: Consistently treat platform_max as control value 2025-03-22 12:50:48 -07:00
target
trace tracing: Add __print_dynamic_array() helper 2025-05-02 07:50:37 +02:00
uapi landlock: Add the errata interface 2025-04-25 10:45:57 +02:00
ufs scsi: ufs: core: Add UFS RTC support 2025-03-07 16:45:35 +01:00
vdso
video
xen xen/mcelog: Add __nonstring annotations for unterminated strings 2025-04-25 10:45:11 +02:00