sched/walt: fix incorrect migrations for RT task

When a RT task is marked migration_disabled, i.e. its p->cpus_ptr
points to a single cpu, walt_newidle_balance() could pull the task
to an un-allowed cpu.

To prevent that check p->cpus_ptr in addition to
pick_highest_pushable_task(), as pick_highest_pushable_task()
and pick_rt_task() only check for p->cpu_mask,
which will be inaccurate in migration_disabled situation.

Change-Id: If7b3cfcb357af7a3ff15de486e70b7b304e4f6ec
Signed-off-by: Abhijeet Dharmapurikar <quic_adharmap@quicinc.com>
Signed-off-by: Shaleen Agrawal <quic_shalagra@quicinc.com>
This commit is contained in:
Abhijeet Dharmapurikar 2022-04-08 16:01:56 -07:00 committed by Rishabh Bhatnagar
parent bd13df8ce9
commit 97a7eb4292

View File

@ -718,6 +718,9 @@ static bool walt_balance_rt(struct rq *this_rq)
if (!p)
goto unlock;
if (!cpumask_test_cpu(this_cpu, p->cpus_ptr))
goto unlock;
wts = (struct walt_task_struct *) p->android_vendor_data1;
/*