Skip to content

Commit 1a55af2

Browse files
fweisbecingomolnar
authored andcommitted
sched: Update rq clock earlier in unthrottle_cfs_rq
In this function we are making use of rq->clock right before the update of the rq clock, let's just call update_rq_clock() just before that to avoid using a stale rq clock value. Signed-off-by: Frederic Weisbecker <fweisbec@gmail.com> Cc: Li Zhong <zhong@linux.vnet.ibm.com> Cc: Steven Rostedt <rostedt@goodmis.org> Cc: Paul Turner <pjt@google.com> Cc: Mike Galbraith <efault@gmx.de> Signed-off-by: Peter Zijlstra <peterz@infradead.org> Link: http://lkml.kernel.org/r/1365724262-20142-5-git-send-email-fweisbec@gmail.com Signed-off-by: Ingo Molnar <mingo@kernel.org>
1 parent 1ad4ec0 commit 1a55af2

1 file changed

Lines changed: 3 additions & 1 deletion

File tree

‎kernel/sched/fair.c‎

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2319,12 +2319,14 @@ void unthrottle_cfs_rq(struct cfs_rq *cfs_rq)
23192319
se = cfs_rq->tg->se[cpu_of(rq_of(cfs_rq))];
23202320

23212321
cfs_rq->throttled = 0;
2322+
2323+
update_rq_clock(rq);
2324+
23222325
raw_spin_lock(&cfs_b->lock);
23232326
cfs_b->throttled_time += rq->clock - cfs_rq->throttled_clock;
23242327
list_del_rcu(&cfs_rq->throttled_list);
23252328
raw_spin_unlock(&cfs_b->lock);
23262329

2327-
update_rq_clock(rq);
23282330
/* update hierarchical throttle state */
23292331
walk_tg_tree_from(cfs_rq->tg, tg_nop, tg_unthrottle_up, (void *)rq);
23302332

0 commit comments

Comments
 (0)