[<prev] [next>] [thread-next>] [day] [month] [year] [list]
Message-Id: <1424918285-94574-1-git-send-email-wanpeng.li@linux.intel.com>
Date: Thu, 26 Feb 2015 10:38:05 +0800
From: Wanpeng Li <wanpeng.li@...ux.intel.com>
To: Ingo Molnar <mingo@...hat.com>,
Peter Zijlstra <peterz@...radead.org>
Cc: Juri Lelli <juri.lelli@....com>, linux-kernel@...r.kernel.org,
Wanpeng Li <wanpeng.li@...ux.intel.com>
Subject: [PATCH RESEND] sched/deadline: fix pull if dl task who's prio changed is not on queue
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@...ux.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 49f92c8..ca391c0 100644
--- a/kernel/sched/deadline.c
+++ b/kernel/sched/deadline.c
@@ -1728,7 +1728,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
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/
Powered by blists - more mailing lists