mirror of
https://github.com/rd-stuffs/msm-4.14.git
synced 2025-02-20 11:45:48 +08:00
sched/fair: Fix excessive packing on the max capacity CPU
When boost is enabled or mid capacity cluster has single cpu, then we traverse both mid and max capacity CPUs. When all of these CPUs are busy, the task should be placed on the CPU which has highest spare capacity. However the current code completely ignores the mid capacity CPU when it encounters the max capacity CPU, though the former has more spare capacity. Fix this issue by enforcing the spare capacity check across different capacity CPUs. Change-Id: I726d47f985f9e59d2bb1c6cf2b743796b57e3051 Signed-off-by: Lingutla Chandrasekhar <clingutla@codeaurora.org> Signed-off-by: Richard Raya <rdxzv.dev@gmail.com>
This commit is contained in:
parent
49caeb1ddc
commit
d074e18d7d
@ -7901,8 +7901,7 @@ static inline int find_best_target(struct task_struct *p, int *backup_cpu,
|
||||
active_cpus_count++;
|
||||
|
||||
/* Favor CPUs with maximum spare capacity */
|
||||
if (capacity_orig >= target_capacity &&
|
||||
spare_cap < target_max_spare_cap)
|
||||
if (spare_cap < target_max_spare_cap)
|
||||
continue;
|
||||
|
||||
target_max_spare_cap = spare_cap;
|
||||
|
Loading…
x
Reference in New Issue
Block a user