sched: WALT: don't bias towards prev CPU when ediff == 0
The target_cpu can be often better choice than previous CPU considering
CPU load. Always place task on target_cpu rather than previous CPU
when energy cost difference is same.
Change-Id: Id47b5a0c5dbbbbb0d7c43e7dd5f2d958683bc1a7
Signed-off-by: Joonwoo Park <joonwoop@codeaurora.org>
diff --git a/kernel/sched/fair.c b/kernel/sched/fair.c
index 34a8e53..9e68a10 100755
--- a/kernel/sched/fair.c
+++ b/kernel/sched/fair.c
@@ -6778,13 +6778,12 @@
return task_cpu(p);
}
} else {
- cpu_idle_idx = cpu_rq(task_cpu(p))->nr_running ? -1 :
- idle_get_state_idx(cpu_rq(task_cpu(p)));
- if (ediff > 0 || (ediff == 0 &&
- cpu_idle_idx <= min_idle_idx)) {
+ if (ediff > 0) {
trace_sched_task_util_energy_diff(p,
- task_cpu(p), task_util(p),
- target_cpu, task_cpu(p), ediff);
+ task_cpu(p),
+ task_util(p),
+ target_cpu,
+ task_cpu(p), ediff);
return task_cpu(p);
}
}