Hi,
On 27/10/14 01:41, Wanpeng Li wrote:
The yield semantic of deadline class is to reduce remaining runtime toOh, right. But, how about what below instead (with a proper comment
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 reduce
remaining runtime to zero if there is still remaining runtime after comsumed
bandwidth is accumulated.
and changelog)?
Thanks,
- Juri
From 108ecdff52b154ea2c79d4aac552ddf1ead871c7 Mon Sep 17 00:00:00 2001
From: Juri Lelli <juri.lelli@xxxxxxx>
Date: Wed, 29 Oct 2014 16:09:06 +0000
Subject: [PATCH] sched/deadline: fix artificial overrun introduced by
yield_task_dl
Signed-off-by: Juri Lelli <juri.lelli@xxxxxxx>
---
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 2e31a30..db6ad38 100644
--- a/kernel/sched/deadline.c
+++ b/kernel/sched/deadline.c
@@ -633,7 +633,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)))