summaryrefslogtreecommitdiffstats
path: root/kernel/sched
diff options
context:
space:
mode:
authorWanpeng Li <wanpeng.li@linux.intel.com>2014-10-31 06:39:35 +0800
committerIngo Molnar <mingo@kernel.org>2014-11-04 07:17:55 +0100
commitcd66091162d34f589631a23bbe0ed214798245b4 (patch)
tree00298f425b985d1a3c0f2ca91a1e2d343f58381f /kernel/sched
parent6b0a563f3a534827c1b56e53c3fd0fccec3c7895 (diff)
downloadblackbird-op-linux-cd66091162d34f589631a23bbe0ed214798245b4.tar.gz
blackbird-op-linux-cd66091162d34f589631a23bbe0ed214798245b4.zip
sched/deadline: Reschedule from switched_from_dl() after a successful pull
In switched_from_dl() we have to issue a resched if we successfully pulled some task from other cpus. This patch also aligns the behavior with -rt. Suggested-by: Juri Lelli <juri.lelli@arm.com> Signed-off-by: Wanpeng Li <wanpeng.li@linux.intel.com> Signed-off-by: Peter Zijlstra (Intel) <peterz@infradead.org> Cc: Kirill Tkhai <ktkhai@parallels.com> Cc: Linus Torvalds <torvalds@linux-foundation.org> Link: http://lkml.kernel.org/r/1414708776-124078-5-git-send-email-wanpeng.li@linux.intel.com Signed-off-by: Ingo Molnar <mingo@kernel.org>
Diffstat (limited to 'kernel/sched')
-rw-r--r--kernel/sched/deadline.c7
1 files changed, 5 insertions, 2 deletions
diff --git a/kernel/sched/deadline.c b/kernel/sched/deadline.c
index e7779b3feec4..362ab1f886b0 100644
--- a/kernel/sched/deadline.c
+++ b/kernel/sched/deadline.c
@@ -1643,8 +1643,11 @@ static void switched_from_dl(struct rq *rq, struct task_struct *p)
* this is the right place to try to pull some other one
* from an overloaded cpu, if any.
*/
- if (!rq->dl.dl_nr_running)
- pull_dl_task(rq);
+ if (!task_on_rq_queued(p) || rq->dl.dl_nr_running)
+ return;
+
+ if (pull_dl_task(rq))
+ resched_curr(rq);
#endif
}
OpenPOWER on IntegriCloud