sched: EAS: schedfreq: fix CPU util over estimation

WALT CPU utilization reports CPU load of all the scheduler classes.
Therefore adding RT class's load additionally will cause frequency
overshooting.  Fix such issue by not accounting RT class load when
requesting capacity.

Change-Id: I29600d7af7ca8c00e0d2ff1e13872024ccaa72bf
Signed-off-by: Joonwoo Park <joonwoop@codeaurora.org>
This commit is contained in:
Joonwoo Park 2017-01-16 18:09:20 -08:00
parent ee4cebd75e
commit 2d7da09705

View file

@ -235,6 +235,18 @@ out:
cpufreq_cpu_put(policy);
}
#ifdef CONFIG_SCHED_WALT
static inline unsigned long
requested_capacity(struct sched_capacity_reqs *scr)
{
if (!walt_disabled && sysctl_sched_use_walt_cpu_util)
return scr->cfs;
return scr->cfs + scr->rt;
}
#else
#define requested_capacity(scr) (scr->cfs + scr->rt)
#endif
void update_cpu_capacity_request(int cpu, bool request)
{
unsigned long new_capacity;
@ -245,7 +257,7 @@ void update_cpu_capacity_request(int cpu, bool request)
scr = &per_cpu(cpu_sched_capacity_reqs, cpu);
new_capacity = scr->cfs + scr->rt;
new_capacity = requested_capacity(scr);
new_capacity = new_capacity * capacity_margin
/ SCHED_CAPACITY_SCALE;
new_capacity += scr->dl;