Skip to content

Commit 71b1da4

Browse files
fweisbecingomolnar
authored andcommitted
sched: Update rq clock before setting fair group shares
Because we may update the execution time in sched_group_set_shares()->update_cfs_shares()->reweight_entity()->update_curr() before reweighting the entity while setting the group shares and this requires an uptodate version of the runqueue clock. 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-3-git-send-email-fweisbec@gmail.com Signed-off-by: Ingo Molnar <mingo@kernel.org>
1 parent 77bd397 commit 71b1da4

1 file changed

Lines changed: 3 additions & 0 deletions

File tree

‎kernel/sched/fair.c‎

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -6107,6 +6107,9 @@ int sched_group_set_shares(struct task_group *tg, unsigned long shares)
61076107
se = tg->se[i];
61086108
/* Propagate contribution to hierarchy */
61096109
raw_spin_lock_irqsave(&rq->lock, flags);
6110+
6111+
/* Possible calls to update_curr() need rq clock */
6112+
update_rq_clock(rq);
61106113
for_each_sched_entity(se)
61116114
update_cfs_shares(group_cfs_rq(se));
61126115
raw_spin_unlock_irqrestore(&rq->lock, flags);

0 commit comments

Comments
 (0)