arm64: Enable max freq invariant scheduler load-tracking and capacity support
authorDietmar Eggemann <dietmar.eggemann@arm.com>
Fri, 25 Sep 2015 16:34:15 +0000 (17:34 +0100)
committerLeo Yan <leo.yan@linaro.org>
Tue, 10 May 2016 08:49:54 +0000 (16:49 +0800)
commitb732dd602c61bab535b95237552e530ca8de8b93
treec8026bf3043369c66e982a9a01a07cdc87b6a7c1
parent5414a72fc30f2069e3943ceb4e39b0ba9cd9c7e3
arm64: Enable max freq invariant scheduler load-tracking and capacity support

Maximum Frequency Invariance has to be part of Cpu Invariance because
Frequency Invariance deals only with differences in load-tracking
introduces by Dynamic Frequency Scaling and not with limiting the
possible range of cpu frequency.

By placing Maximum Frequency Invariance into Cpu Invariance,
load-tracking is scaled via arch_scale_cpu_capacity()
in __update_load_avg() and cpu capacity is scaled via
arch_scale_cpu_capacity() in update_cpu_capacity().

To be able to save the extra multiplication in the scheduler hotpath
(__update_load_avg()) we could:

  1 Inform cpufreq about base cpu capacity at boot and let it handle
    scale_cpu_capacity() as well.
  2 Use the cpufreq policy callback which would update a per-cpu current
    cpu_scale and this value would be return in scale_cpu_capacity().
  3 Use per-cpu current max_freq_scale and current cpu_scale with the
    current patch.

Including <linux/cpufreq.h> in topology.h like for the arm arch doesn't
work because of CONFIG_COMPAT=y (Kernel support for 32-bit EL0).
That's why cpufreq_scale_max_freq_capacity() has to be declared extern
in topology.h.

Signed-off-by: Dietmar Eggemann <dietmar.eggemann@arm.com>
arch/arm64/include/asm/topology.h
arch/arm64/kernel/topology.c