cpufreq: Frequency invariant scheduler load-tracking support
authorDietmar Eggemann <dietmar.eggemann@arm.com>
Thu, 17 Sep 2015 15:10:56 +0000 (16:10 +0100)
committerLeo Yan <leo.yan@linaro.org>
Tue, 10 May 2016 08:49:48 +0000 (16:49 +0800)
commit259bd4cd8a4c5776e86ae1a86f1f8e1168e84212
treedbdc4dbc80be329a015e6898d052664fa07aba19
parent0ecbd590a7175818fcbccc9d5b1dc819aae25c86
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