When looking for a task to be idle-pulled, don't consider tasks where the affinity does not allow that task to be placed on the target CPU.
Signed-off-by: Chris Redpath chris.redpath@arm.com --- kernel/sched/fair.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-)
diff --git a/kernel/sched/fair.c b/kernel/sched/fair.c index d59e0de..df28dbf 100644 --- a/kernel/sched/fair.c +++ b/kernel/sched/fair.c @@ -7178,7 +7178,8 @@ static unsigned int hmp_idle_pull(int this_cpu) * CPU is heavier than previous task */ if (hmp_task_eligible_for_up_migration(curr) && - curr->avg.load_avg_ratio > ratio) { + curr->avg.load_avg_ratio > ratio && + cpumask_test_cpu(this_cpu, tsk_cpus_allowed(task_of(curr)))) { p = task_of(curr); target = rq; ratio = curr->avg.load_avg_ratio;