sched: fair: Cover more WALT balancing cases

These pieces of codes are only useful for WALT

Change-Id: I520684e747067deb95fa94ac2cbee607c6fbf482
Signed-off-by: Diep Quynh <remilia.1505@gmail.com>
Signed-off-by: Alexander Winkowski <dereference23@outlook.com>
fourteen
Diep Quynh 4 years ago committed by Jenna
parent 7ca8c215a8
commit 4b365e2430
  1. 4
      kernel/sched/fair.c

@ -7761,11 +7761,13 @@ static inline int find_best_target(struct task_struct *p, int *backup_cpu,
continue;
}
#ifdef CONFIG_SCHED_WALT
/*
* Consider only idle CPUs for active migration.
*/
if (p->state == TASK_RUNNING)
continue;
#endif
/*
* Case C) Non latency sensitive tasks on ACTIVE CPUs.
@ -7884,10 +7886,12 @@ static inline int find_best_target(struct task_struct *p, int *backup_cpu,
? best_active_cpu
: best_idle_cpu;
#ifdef CONFIG_SCHED_WALT
if (target_cpu == -1 && most_spare_cap_cpu != -1 &&
/* ensure we use active cpu for active migration */
!(p->state == TASK_RUNNING && !idle_cpu(most_spare_cap_cpu)))
target_cpu = most_spare_cap_cpu;
#endif
trace_sched_find_best_target(p, prefer_idle, min_util, cpu,
best_idle_cpu, best_active_cpu,

Loading…
Cancel
Save