[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Message-ID: <tip-1ba93d42727c44001aa8ccffd39c8ab5705379e2@git.kernel.org>
Date: Fri, 19 Sep 2014 04:46:00 -0700
From: tip-bot for Kirill Tkhai <tipbot@...or.com>
To: linux-tip-commits@...r.kernel.org
Cc: linux-kernel@...r.kernel.org, ktkhai@...allels.com, hpa@...or.com,
mingo@...nel.org, peterz@...radead.org, tglx@...utronix.de
Subject: [tip:sched/core] sched/dl: Simplify pick_dl_task()
Commit-ID: 1ba93d42727c44001aa8ccffd39c8ab5705379e2
Gitweb: http://git.kernel.org/tip/1ba93d42727c44001aa8ccffd39c8ab5705379e2
Author: Kirill Tkhai <ktkhai@...allels.com>
AuthorDate: Fri, 12 Sep 2014 17:42:20 +0400
Committer: Ingo Molnar <mingo@...nel.org>
CommitDate: Fri, 19 Sep 2014 12:35:20 +0200
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@...allels.com>
Signed-off-by: Peter Zijlstra (Intel) <peterz@...radead.org>
Link: http://lkml.kernel.org/r/1410529340.3569.27.camel@tkhai
Signed-off-by: Ingo Molnar <mingo@...nel.org>
---
kernel/sched/deadline.c | 4 +---
1 file changed, 1 insertion(+), 3 deletions(-)
diff --git a/kernel/sched/deadline.c b/kernel/sched/deadline.c
index cc4eb89..aaa5abb 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;
}
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/
Powered by blists - more mailing lists