cpufreq/schedutil: Use a fixed reference frequency
authorVincent Guittot <vincent.guittot@linaro.org>
Mon, 11 Dec 2023 10:48:51 +0000 (11:48 +0100)
committerIngo Molnar <mingo@kernel.org>
Sat, 23 Dec 2023 14:52:35 +0000 (15:52 +0100)
commitb3edde44e5d4504c23a176819865cd603fd16d6c
tree4f2dfd374c65e5cec4b4417589e3384671446c4c
parent599457ba15403037b489fe536266a3d5f9efaed7
cpufreq/schedutil: Use a fixed reference frequency

cpuinfo.max_freq can change at runtime because of boost as an example. This
implies that the value could be different than the one that has been
used when computing the capacity of a CPU.

The new arch_scale_freq_ref() returns a fixed and coherent reference
frequency that can be used when computing a frequency based on utilization.

Use this arch_scale_freq_ref() when available and fallback to
policy otherwise.

Signed-off-by: Vincent Guittot <vincent.guittot@linaro.org>
Signed-off-by: Ingo Molnar <mingo@kernel.org>
Tested-by: Lukasz Luba <lukasz.luba@arm.com>
Reviewed-by: Lukasz Luba <lukasz.luba@arm.com>
Reviewed-by: Dietmar Eggemann <dietmar.eggemann@arm.com>
Acked-by: Rafael J. Wysocki <rafael@kernel.org>
Acked-by: Viresh Kumar <viresh.kumar@linaro.org>
Link: https://lore.kernel.org/r/20231211104855.558096-4-vincent.guittot@linaro.org
kernel/sched/cpufreq_schedutil.c