lkml.org 
[lkml]   [2020]   [Jul]   [6]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
Patch in this message
/
Date
From
Subject[PATCH] sched/deadline: dome some cleanup for push_dl_task()
'commit 840d719604b0 ("sched/deadline: Update rq_clock of later_rq when pushing a task")'
introduced the update_rq_clock() to fix the "used-before-update" bug.

'commit f4904815f97a ("sched/deadline: Fix double accounting of rq/running bw in push & pull")'
took away the bug source(add_running_bw()).

We no longer need to update rq_clock in advance, let activate_task()
worry about that.

Signed-off-by: Peng Liu <iwtbavbm@gmail.com>
---
kernel/sched/deadline.c | 8 +-------
1 file changed, 1 insertion(+), 7 deletions(-)

diff --git a/kernel/sched/deadline.c b/kernel/sched/deadline.c
index 504d2f51b0d6..c3fa11f84d93 100644
--- a/kernel/sched/deadline.c
+++ b/kernel/sched/deadline.c
@@ -2104,13 +2104,7 @@ static int push_dl_task(struct rq *rq)

deactivate_task(rq, next_task, 0);
set_task_cpu(next_task, later_rq->cpu);
-
- /*
- * Update the later_rq clock here, because the clock is used
- * by the cpufreq_update_util() inside __add_running_bw().
- */
- update_rq_clock(later_rq);
- activate_task(later_rq, next_task, ENQUEUE_NOCLOCK);
+ activate_task(later_rq, next_task, 0);
ret = 1;

resched_curr(later_rq);
--
2.20.1
\
 
 \ /
  Last update: 2020-07-06 18:05    [W:0.107 / U:0.092 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site