ANDROID: sched: EAS: check energy_aware() before calling select_energy_cpu_brute() in up-migrate path
In up-migrate path, select_energy_cpu_brute() was called directly
without checking energy_aware(). This will make select_energy_cpu_brute()
always worked even disabling energy_aware() on the asymmetric cpu
capacity system.
Signed-off-by: Ke Wang <ke.wang@spreadtrum.com>
diff --git a/kernel/sched/fair.c b/kernel/sched/fair.c
index 37ab210..b0573f2 100644
--- a/kernel/sched/fair.c
+++ b/kernel/sched/fair.c
@@ -10306,7 +10306,7 @@ void check_for_migration(struct rq *rq, struct task_struct *p)
int active_balance;
int cpu = task_cpu(p);
- if (rq->misfit_task) {
+ if (energy_aware() && rq->misfit_task) {
if (rq->curr->state != TASK_RUNNING ||
rq->curr->nr_cpus_allowed == 1)
return;