aboutsummaryrefslogtreecommitdiffstats
path: root/kernel/sched
diff options
context:
space:
mode:
authorFrederic Weisbecker <fweisbec@gmail.com>2013-04-11 19:50:59 -0400
committerIngo Molnar <mingo@kernel.org>2013-05-28 03:40:23 -0400
commit71b1da46ff70309a2ec12ce943aa0d192d2c8f0c (patch)
treea5ee1533a51cc3533b030ebc69ecb2ecec4c791d /kernel/sched
parent77bd39702f0b3840cea17681409270b16a3b93c0 (diff)
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>
Diffstat (limited to 'kernel/sched')
-rw-r--r--kernel/sched/fair.c3
1 files changed, 3 insertions, 0 deletions
diff --git a/kernel/sched/fair.c b/kernel/sched/fair.c
index f62b16dfba63..f76ca21711bb 100644
--- a/kernel/sched/fair.c
+++ b/kernel/sched/fair.c
@@ -6107,6 +6107,9 @@ int sched_group_set_shares(struct task_group *tg, unsigned long shares)
6107 se = tg->se[i]; 6107 se = tg->se[i];
6108 /* Propagate contribution to hierarchy */ 6108 /* Propagate contribution to hierarchy */
6109 raw_spin_lock_irqsave(&rq->lock, flags); 6109 raw_spin_lock_irqsave(&rq->lock, flags);
6110
6111 /* Possible calls to update_curr() need rq clock */
6112 update_rq_clock(rq);
6110 for_each_sched_entity(se) 6113 for_each_sched_entity(se)
6111 update_cfs_shares(group_cfs_rq(se)); 6114 update_cfs_shares(group_cfs_rq(se));
6112 raw_spin_unlock_irqrestore(&rq->lock, flags); 6115 raw_spin_unlock_irqrestore(&rq->lock, flags);