cpufreq: Frequency invariant scheduler load-tracking support
authorDietmar Eggemann <dietmar.eggemann@arm.com>
Thu, 17 Sep 2015 15:10:56 +0000 (16:10 +0100)
committerAmit Pundir <amit.pundir@linaro.org>
Wed, 14 Sep 2016 09:18:50 +0000 (14:48 +0530)
commite3c1175d916b271863b47bfa4984864e1eaba11b
tree0383f59930c831e322d6615de6f722657068ac78
parent8e211455958b9dd3266e0ae53e324e0d4231721d
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>
drivers/cpufreq/cpufreq.c
include/linux/cpufreq.h