cpufreq: Frequency invariant scheduler load-tracking support
authorDietmar Eggemann <dietmar.eggemann@arm.com>
Thu, 17 Sep 2015 15:10:56 +0000 (16:10 +0100)
committerPunit Agrawal <punit.agrawal@arm.com>
Mon, 21 Mar 2016 12:34:30 +0000 (12:34 +0000)
commit6ccce9a636497376b02791a73fccfa12cc007480
tree613a6692062c2b1dfc562102c7fb36642651fe71
parent4c2f02b7b604d652cfcf3a580e7330a5711b4540
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