sched/fair: schedule lower priority tasks from little cores

With scheduler placement hint, there still could be several boosted
tasks contending for big cores. On chipset with fewer big cores, it
might cause problems like jank. To improve it, schedule tasks of prio
>= DEFAULT_PRIO from little cores if they could fit, even for tasks
that prefer high capacity cpus, since such prio means they are less
important.

Bug: 158936596
Test: tasks scheduled as expected
Signed-off-by: Rick Yiu <rickyiu@google.com>
Change-Id: Ic0cc06461818944e3e97ec0493c0d9c9f1a5e217
[backported to 4.14]
Signed-off-by: Volodymyr Zhdanov <wight554@gmail.com>
Signed-off-by: Alexander Winkowski <dereference23@outlook.com>
fourteen
Rick Yiu 5 years ago committed by Jenna
parent fdbf09dfc1
commit 59651c6221
  1. 4
      kernel/sched/fair.c

@ -7438,7 +7438,7 @@ static int start_cpu(struct task_struct *p, bool boosted,
}
#endif
if (boosted) {
if (boosted && p->prio <= DEFAULT_PRIO) {
if (rd->mid_cap_orig_cpu != -1 &&
task_fits_max(p, rd->mid_cap_orig_cpu))
return rd->mid_cap_orig_cpu;
@ -7879,7 +7879,7 @@ static inline int find_best_target(struct task_struct *p, int *backup_cpu,
*/
if ((prefer_idle && best_idle_cpu != -1) ||
(boosted && (best_idle_cpu != -1 || target_cpu != -1))) {
if (boosted) {
if (boosted && p->prio <= DEFAULT_PRIO) {
if (!next_group_higher_cap)
break;
} else {

Loading…
Cancel
Save