mirror of
https://github.com/torvalds/linux.git
synced 2026-07-30 19:21:28 +02:00
sched: walt: Account rt scale to cpu_capacity
While updating cpu_rq->cpu_capacity, we are ignoring rt pressure, and using same as cpu_capacity_orig, which might lead to unfair scheduler decisions. Fix it by accouting rt scale to cpu_capacity. Change-Id: Icead0af0d8a309cc5f93438a4d4d7e7e7c93653c Signed-off-by: Lingutla Chandrasekhar <clingutla@codeaurora.org>
This commit is contained in:
parent
7d1e74f709
commit
0e90c114dd
|
|
@ -3717,6 +3717,7 @@ static void android_rvh_update_cpu_capacity(void *unused, int cpu, unsigned long
|
|||
unsigned long thermal_pressure = arch_scale_thermal_pressure(cpu);
|
||||
unsigned long thermal_cap;
|
||||
struct walt_sched_cluster *cluster;
|
||||
unsigned long rt_pressure = max_capacity - *capacity;
|
||||
|
||||
if (unlikely(walt_disabled))
|
||||
return;
|
||||
|
|
@ -3736,7 +3737,7 @@ static void android_rvh_update_cpu_capacity(void *unused, int cpu, unsigned long
|
|||
cluster->max_possible_freq);
|
||||
|
||||
cpu_rq(cpu)->cpu_capacity_orig = min(max_capacity, thermal_cap);
|
||||
*capacity = cpu_rq(cpu)->cpu_capacity_orig;
|
||||
*capacity = cpu_rq(cpu)->cpu_capacity_orig - rt_pressure;
|
||||
}
|
||||
|
||||
static void android_rvh_sched_cpu_starting(void *unused, int cpu)
|
||||
|
|
|
|||
Loading…
Reference in New Issue
Block a user