diff options
author | Kirill Tkhai <ktkhai@parallels.com> | 2014-09-12 17:42:20 +0400 |
---|---|---|
committer | Ingo Molnar <mingo@kernel.org> | 2014-09-19 12:35:20 +0200 |
commit | 1ba93d42727c44001aa8ccffd39c8ab5705379e2 (patch) | |
tree | c324239cfaaadf4bd5511d6bedf3711f6311ae75 /kernel/sched | |
parent | f3f1768f89d601ad29f4701deef91caaa82b9f57 (diff) |
sched/dl: Simplify pick_dl_task()
1) Nobody calls pick_dl_task() with negative cpu, it's old RT leftover.
2) If p->nr_cpus_allowed is 1, than the affinity has just been changed
in set_cpus_allowed_ptr(); we'll pick it just earlier than migration
thread.
Signed-off-by: Kirill Tkhai <ktkhai@parallels.com>
Signed-off-by: Peter Zijlstra (Intel) <peterz@infradead.org>
Link: http://lkml.kernel.org/r/1410529340.3569.27.camel@tkhai
Signed-off-by: Ingo Molnar <mingo@kernel.org>
Diffstat (limited to 'kernel/sched')
-rw-r--r-- | kernel/sched/deadline.c | 4 |
1 files changed, 1 insertions, 3 deletions
diff --git a/kernel/sched/deadline.c b/kernel/sched/deadline.c index cc4eb89019c1..aaa5abbff2f1 100644 --- a/kernel/sched/deadline.c +++ b/kernel/sched/deadline.c @@ -1121,10 +1121,8 @@ static void set_curr_task_dl(struct rq *rq) static int pick_dl_task(struct rq *rq, struct task_struct *p, int cpu) { if (!task_running(rq, p) && - (cpu < 0 || cpumask_test_cpu(cpu, &p->cpus_allowed)) && - (p->nr_cpus_allowed > 1)) + cpumask_test_cpu(cpu, tsk_cpus_allowed(p))) return 1; - return 0; } |