diff options
| author | Dietmar Eggemann <dietmar.eggemann@arm.com> | 2015-09-22 16:47:48 +0100 |
|---|---|---|
| committer | Leo Yan <leo.yan@linaro.org> | 2016-05-10 16:49:54 +0800 |
| commit | b03f1ba3d5bb9db0ca495c8c33ef88588daaae50 (patch) | |
| tree | 89e993c75786cdc5d967b314092e2e1919fd5647 /include/linux | |
| parent | 8296e78e5eaa9bfebf251cbd4bddd97322fa13a9 (diff) | |
cpufreq: Max freq invariant scheduler load-tracking and cpu capacity support
Implements cpufreq_scale_max_freq_capacity() to provide the scheduler
with a maximum frequency scaling correction factor for more accurate
load-tracking and cpu capacity handling by being able to deal with
frequency capping.
This scaling factor describes the influence of running a cpu with a
current maximum frequency lower than the absolute possible maximum
frequency on load tracking and cpu capacity.
The factor is:
current_max_freq(cpu) << SCHED_CAPACITY_SHIFT / max_freq(cpu)
In fact, max_freq_scale should be a struct cpufreq_policy data member.
But this would require that the scheduler hot path (__update_load_avg())
would have to grab the cpufreq lock. This can be avoided by using per-cpu
data initialized to SCHED_CAPACITY_SCALE for max_freq_scale.
Signed-off-by: Dietmar Eggemann <dietmar.eggemann@arm.com>
Diffstat (limited to 'include/linux')
| -rw-r--r-- | include/linux/cpufreq.h | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/include/linux/cpufreq.h b/include/linux/cpufreq.h index 11c65f536b6c..9b1d61e1f1d7 100644 --- a/include/linux/cpufreq.h +++ b/include/linux/cpufreq.h @@ -619,4 +619,5 @@ int cpufreq_generic_init(struct cpufreq_policy *policy, struct sched_domain; unsigned long cpufreq_scale_freq_capacity(struct sched_domain *sd, int cpu); +unsigned long cpufreq_scale_max_freq_capacity(int cpu); #endif /* _LINUX_CPUFREQ_H */ |
