OSDN Git Service

ANDROID: sched/fair: add arch scaling function for max frequency capping
authorDietmar Eggemann <dietmar.eggemann@arm.com>
Thu, 10 May 2018 14:48:06 +0000 (15:48 +0100)
committerAmit Pundir <amit.pundir@linaro.org>
Tue, 14 Aug 2018 12:17:11 +0000 (17:47 +0530)
commitc160581cc1bdf88984cc7e0af83081385220a1bc
tree353c0350fdb9842c35bebe87c7910b9bd77f334b
parent4a3b4dc4453167114c03f1680c431a2af17b3839
ANDROID: sched/fair: add arch scaling function for max frequency capping

To be able to scale the cpu capacity by this factor introduce a call to
the new arch scaling function arch_scale_max_freq_capacity() in
update_cpu_capacity() and provide a default implementation which returns
SCHED_CAPACITY_SCALE.

Another subsystem (e.g. cpufreq) or architectural or platform specific
code can overwrite this default implementation, exactly as for frequency
and cpu invariance. It has to be enabled by the arch by defining
arch_scale_max_freq_capacity to the actual implementation.

Signed-off-by: Ionela Voinescu <ionela.voinescu@arm.com>
Signed-off-by: Dietmar Eggemann <dietmar.eggemann@arm.com>
[ - Fixed trivial cherry-pick issue
  - Fix CONFIG_SMP=n build ]
Signed-off-by: Quentin Perret <quentin.perret@arm.com>
Change-Id: I770a8b1f4f7340e9e314f71c64a765bf880f4b4d
kernel/sched/fair.c
kernel/sched/sched.h