[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <tip-804968809c321066cca028d4cbd533a420f964bc@git.kernel.org>
Date: Tue, 4 Nov 2014 08:11:07 -0800
From: tip-bot for Wanpeng Li <tipbot@...or.com>
To: linux-tip-commits@...r.kernel.org
Cc: ktkhai@...allels.com, juri.lelli@....com, tglx@...utronix.de,
wanpeng.li@...ux.intel.com, torvalds@...ux-foundation.org,
mingo@...nel.org, hpa@...or.com, linux-kernel@...r.kernel.org,
peterz@...radead.org
Subject: [tip:sched/core] sched/deadline:
Fix artificial overrun introduced by yield_task_dl()
Commit-ID: 804968809c321066cca028d4cbd533a420f964bc
Gitweb: http://git.kernel.org/tip/804968809c321066cca028d4cbd533a420f964bc
Author: Wanpeng Li <wanpeng.li@...ux.intel.com>
AuthorDate: Fri, 31 Oct 2014 06:39:32 +0800
Committer: Ingo Molnar <mingo@...nel.org>
CommitDate: Tue, 4 Nov 2014 07:17:53 +0100
sched/deadline: Fix artificial overrun introduced by yield_task_dl()
The yield semantic of deadline class is to reduce remaining runtime to
zero, and then update_curr_dl() will stop it. However, comsumed bandwidth
is reduced from the budget of yield task again even if it has already been
set to zero which leads to artificial overrun. This patch fix it by make
sure we don't steal some more time from the task that yielded in update_curr_dl().
Suggested-by: Juri Lelli <juri.lelli@....com>
Signed-off-by: Wanpeng Li <wanpeng.li@...ux.intel.com>
Signed-off-by: Peter Zijlstra (Intel) <peterz@...radead.org>
Cc: Kirill Tkhai <ktkhai@...allels.com>
Cc: Linus Torvalds <torvalds@...ux-foundation.org>
Link: http://lkml.kernel.org/r/1414708776-124078-2-git-send-email-wanpeng.li@linux.intel.com
Signed-off-by: Ingo Molnar <mingo@...nel.org>
---
kernel/sched/deadline.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/kernel/sched/deadline.c b/kernel/sched/deadline.c
index 9d483e8..c047a94 100644
--- a/kernel/sched/deadline.c
+++ b/kernel/sched/deadline.c
@@ -628,7 +628,7 @@ static void update_curr_dl(struct rq *rq)
sched_rt_avg_update(rq, delta_exec);
- dl_se->runtime -= delta_exec;
+ dl_se->runtime -= dl_se->dl_yielded ? 0 : delta_exec;
if (dl_runtime_exceeded(rq, dl_se)) {
__dequeue_task_dl(rq, curr, 0);
if (likely(start_dl_timer(dl_se, curr->dl.dl_boosted)))
--
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