diff options
Diffstat (limited to 'kernel/sched/deadline.c')
-rw-r--r-- | kernel/sched/deadline.c | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/kernel/sched/deadline.c b/kernel/sched/deadline.c index efb94124420d..abfaf3d9a29f 100644 --- a/kernel/sched/deadline.c +++ b/kernel/sched/deadline.c | |||
@@ -1164,6 +1164,13 @@ static int find_later_rq(struct task_struct *task) | |||
1164 | if (task->nr_cpus_allowed == 1) | 1164 | if (task->nr_cpus_allowed == 1) |
1165 | return -1; | 1165 | return -1; |
1166 | 1166 | ||
1167 | /* | ||
1168 | * We have to consider system topology and task affinity | ||
1169 | * first, then we can look for a suitable cpu. | ||
1170 | */ | ||
1171 | cpumask_copy(later_mask, task_rq(task)->rd->span); | ||
1172 | cpumask_and(later_mask, later_mask, cpu_active_mask); | ||
1173 | cpumask_and(later_mask, later_mask, &task->cpus_allowed); | ||
1167 | best_cpu = cpudl_find(&task_rq(task)->rd->cpudl, | 1174 | best_cpu = cpudl_find(&task_rq(task)->rd->cpudl, |
1168 | task, later_mask); | 1175 | task, later_mask); |
1169 | if (best_cpu == -1) | 1176 | if (best_cpu == -1) |