Skip to content

Commit

Permalink
sched/deadline: Reschedule from switched_from_dl() after a successful…
Browse files Browse the repository at this point in the history
… 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>
  • Loading branch information
Wanpeng Li authored and Ingo Molnar committed Nov 4, 2014
1 parent 6b0a563 commit cd66091
Showing 1 changed file with 5 additions and 2 deletions.
7 changes: 5 additions & 2 deletions kernel/sched/deadline.c
Original file line number Diff line number Diff line change
Expand Up @@ -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
}

Expand Down

0 comments on commit cd66091

Please sign in to comment.