aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorKirill Tkhai <[email protected]>2014-01-28 11:26:14 +0400
committerIngo Molnar <[email protected]>2014-02-09 13:31:48 +0100
commit390f3258cb2d031f1c17aa32e771ebd336e89073 (patch)
treed3661f84b3a895c455d7b14a48bd97505ceb5a80
parenteaa4e4fcf1b5c60e656d93242f7fe422173f25b2 (diff)
sched/deadline: Skip in switched_to_dl() if task is current
When p is current and it's not of dl class, then there are no other dl taks in the rq. If we had had pushable tasks in some other rq, they would have been pushed earlier. So, skip "p == rq->curr" case. Signed-off-by: Kirill Tkhai <[email protected]> Acked-by: Juri Lelli <[email protected]> Signed-off-by: Peter Zijlstra <[email protected]> Link: http://lkml.kernel.org/r/20140128072421.32315.25300.stgit@tkhai Signed-off-by: Ingo Molnar <[email protected]>
-rw-r--r--kernel/sched/deadline.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/kernel/sched/deadline.c b/kernel/sched/deadline.c
index 0dd5e0971a07..b5700bceee55 100644
--- a/kernel/sched/deadline.c
+++ b/kernel/sched/deadline.c
@@ -1560,7 +1560,7 @@ static void switched_to_dl(struct rq *rq, struct task_struct *p)
if (unlikely(p->dl.dl_throttled))
return;
- if (p->on_rq || rq->curr != p) {
+ if (p->on_rq && rq->curr != p) {
#ifdef CONFIG_SMP
if (rq->dl.overloaded && push_dl_task(rq) && rq != task_rq(p))
/* Only reschedule if pushing failed */