diff options
| author | Dietmar Eggemann <dietmar.eggemann@arm.com> | 2015-09-17 16:10:56 +0100 |
|---|---|---|
| committer | Amit Pundir <amit.pundir@linaro.org> | 2016-09-14 14:48:50 +0530 |
| commit | e3c1175d916b271863b47bfa4984864e1eaba11b (patch) | |
| tree | 0383f59930c831e322d6615de6f722657068ac78 /include/linux/cpufreq.h | |
| parent | 8e211455958b9dd3266e0ae53e324e0d4231721d (diff) | |
cpufreq: Frequency invariant scheduler load-tracking support
Implements cpufreq_scale_freq_capacity() to provide the scheduler with a
frequency scaling correction factor for more accurate load-tracking.
The factor is:
current_freq(cpu) << SCHED_CAPACITY_SHIFT / max_freq(cpu)
In fact, 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 freq_scale.
Signed-off-by: Dietmar Eggemann <dietmar.eggemann@arm.com>
Diffstat (limited to 'include/linux/cpufreq.h')
| -rw-r--r-- | include/linux/cpufreq.h | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/include/linux/cpufreq.h b/include/linux/cpufreq.h index 3ac01621cd1f..5f1e66e544f5 100644 --- a/include/linux/cpufreq.h +++ b/include/linux/cpufreq.h @@ -619,4 +619,7 @@ unsigned int cpufreq_generic_get(unsigned int cpu); int cpufreq_generic_init(struct cpufreq_policy *policy, struct cpufreq_frequency_table *table, unsigned int transition_latency); + +struct sched_domain; +unsigned long cpufreq_scale_freq_capacity(struct sched_domain *sd, int cpu); #endif /* _LINUX_CPUFREQ_H */ |
