sched/deadline: Push task away if the deadline is equal to curr during wakeup
authorWanpeng Li <[email protected]>
Thu, 30 Oct 2014 22:39:34 +0000 (06:39 +0800)
committerIngo Molnar <[email protected]>
Tue, 4 Nov 2014 06:17:55 +0000 (07:17 +0100)
This patch pushes task away if the dealine of the task is equal
to current during wake up. The same behavior as rt class.

Signed-off-by: Wanpeng Li <[email protected]>
Signed-off-by: Peter Zijlstra (Intel) <[email protected]>
Cc: Juri Lelli <[email protected]>
Cc: Kirill Tkhai <[email protected]>
Cc: Linus Torvalds <[email protected]>
Link: http://lkml.kernel.org/r/[email protected]
Signed-off-by: Ingo Molnar <[email protected]>
kernel/sched/deadline.c

index 8867a67b8f0a063b2585791a8e22c3261d5e39f5..e7779b3feec4c1fec1e5cb763b8606bccb000a6a 100644 (file)
@@ -1506,7 +1506,7 @@ static void task_woken_dl(struct rq *rq, struct task_struct *p)
            p->nr_cpus_allowed > 1 &&
            dl_task(rq->curr) &&
            (rq->curr->nr_cpus_allowed < 2 ||
-            dl_entity_preempt(&rq->curr->dl, &p->dl))) {
+            !dl_entity_preempt(&p->dl, &rq->curr->dl))) {
                push_dl_tasks(rq);
        }
 }