lkml.org 
[lkml]   [2014]   [Nov]   [19]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
Patch in this message
/
From
Subject[PATCH 2/2] sched/deadline: fix pull if dl task who's prio changed is not on queue
Date
Dl task who is not on queue and it is also the curr task simultaneously 
can not happen. In addition, pull since the priority of a not on queue
dl task doesn't make any sense.

This patch fix it by don't pull if dl task who's prio changed is not on
queue.

Signed-off-by: Wanpeng Li <wanpeng.li@linux.intel.com>
---
kernel/sched/deadline.c | 5 ++++-
1 file changed, 4 insertions(+), 1 deletion(-)

diff --git a/kernel/sched/deadline.c b/kernel/sched/deadline.c
index b9e44ae..4eaf55c 100644
--- a/kernel/sched/deadline.c
+++ b/kernel/sched/deadline.c
@@ -1678,7 +1678,10 @@ static void switched_to_dl(struct rq *rq, struct task_struct *p)
static void prio_changed_dl(struct rq *rq, struct task_struct *p,
int oldprio)
{
- if (task_on_rq_queued(p) || rq->curr == p) {
+ if (!task_on_rq_queued(p))
+ return;
+
+ if (rq->curr == p) {
#ifdef CONFIG_SMP
/*
* This might be too much, but unfortunately
--
1.9.1


\
 
 \ /
  Last update: 2014-11-19 12:01    [W:0.061 / U:0.616 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site