[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-Id: <1416962647-76792-4-git-send-email-wanpeng.li@linux.intel.com>
Date: Wed, 26 Nov 2014 08:44:03 +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>,
Kirill Tkhai <ktkhai@...allels.com>,
linux-kernel@...r.kernel.org,
Wanpeng Li <wanpeng.li@...ux.intel.com>
Subject: [PATCH v6 3/7] sched/deadline: fix dl entity is still mark yield after replenishing
Yield task semantic for deadline task is get off from the CPU until our next
instance, we mark the task got to sleep until its current deadline by forcing
its runtime to zero and update_curr_dl() stops it and the bandwidth timer will
wake it up and will give it new scheduling parameters.
Bandwidth timer may fail to start in update_curr_dl() and instead replenishing
the budget immediately, however, dl_yielded of dl_se is cleared when bandwidth
timer fire, the immediate replenishing miss to reset it.
This patch fix it by resetting the dl_yielded flag after the immediate replenishing
if fail to start bandwidth timer.
Cc: Juri Lelli <juri.lelli@....com>
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 2d982ce..b102f35 100644
--- a/kernel/sched/deadline.c
+++ b/kernel/sched/deadline.c
@@ -633,8 +633,11 @@ static void update_curr_dl(struct rq *rq)
__dequeue_task_dl(rq, curr, 0);
if (likely(start_dl_timer(dl_se, curr->dl.dl_boosted)))
dl_se->dl_throttled = 1;
- else
+ else {
enqueue_task_dl(rq, curr, ENQUEUE_REPLENISH);
+ if (unlikely(dl_se->dl_yielded))
+ dl_se->dl_yielded = 0;
+ }
if (!is_leftmost(curr, &rq->dl))
resched_curr(rq);
--
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