mirror of
https://github.com/torvalds/linux.git
synced 2026-06-08 14:42:37 +02:00
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:
parent
cf9ee81955
commit
55f3247db9
|
|
@ -235,6 +235,18 @@ static void update_fdomain_capacity_request(int cpu)
|
|||
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;
|
||||
|
|
|
|||
Loading…
Reference in New Issue
Block a user