sched/walt: Don't migrate running task to a busy CPU

Active migration of running tasks is allowed only onto idle CPUs.
Add a check for it in walt_lb_find_busiest_lower_cap_cpu().

Change-Id: I195aadc8b5822d4f231edd2f57d9df5ef1a6e350
Signed-off-by: Pavankumar Kondeti <pkondeti@codeaurora.org>
This commit is contained in:
Pavankumar Kondeti 2021-02-12 14:24:03 +05:30 committed by Rishabh Bhatnagar
parent 6fff83754b
commit c7afff3259

View File

@ -439,7 +439,9 @@ static int walt_lb_find_busiest_lower_cap_cpu(int dst_cpu, const cpumask_t *src_
if (cpu_rq(i)->active_balance)
continue;
if (cpu_rq(i)->cfs.h_nr_running < 2 && !wrq->walt_stats.nr_big_tasks)
/* active migration is allowed only to idle cpu */
if (cpu_rq(i)->cfs.h_nr_running < 2 &&
(!wrq->walt_stats.nr_big_tasks || !available_idle_cpu(dst_cpu)))
continue;
if (!walt_rotation_enabled && !cpu_overutilized(i))