aboutsummaryrefslogtreecommitdiffstats
path: root/kernel
diff options
context:
space:
mode:
authorPaul Turner <pjt@google.com>2011-07-05 22:07:21 -0400
committerIngo Molnar <mingo@elte.hu>2011-07-21 12:01:43 -0400
commit9bbd7374361d9bfc75108c3ad1c1b6db28b1be59 (patch)
treed787a387a2a2e3d8c0476b79ae57dd217098763f /kernel
parent994bf1c92270e3d7731ea08f1d1bd7a668314e60 (diff)
sched: update correct entity's runtime in check_preempt_wakeup()
While looking at check_preempt_wakeup() I realized that we are potentially updating the wrong entity in the fair-group scheduling case. In this case the current task's cfs_rq may not be the same as the one used for the comparison between the waking task and the existing task's vruntime. This potentially results in us using a stale vruntime in the pre-emption decision, providing a small false preference for the previous task. The effects of this are bounded since we always perform a hierarchal update on the tick. Signed-off-by: Paul Turner <pjt@google.com> Signed-off-by: Peter Zijlstra <a.p.zijlstra@chello.nl> Link: http://lkml.kernel.org/r/CAPM31R+2Ke2urUZKao5W92_LupdR4AYEv-EZWiJ3tG=tEes2cw@mail.gmail.com Signed-off-by: Ingo Molnar <mingo@elte.hu>
Diffstat (limited to 'kernel')
-rw-r--r--kernel/sched_fair.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/kernel/sched_fair.c b/kernel/sched_fair.c
index e7d67a9e259a..f88720b3df8b 100644
--- a/kernel/sched_fair.c
+++ b/kernel/sched_fair.c
@@ -1919,8 +1919,8 @@ static void check_preempt_wakeup(struct rq *rq, struct task_struct *p, int wake_
1919 if (!sched_feat(WAKEUP_PREEMPT)) 1919 if (!sched_feat(WAKEUP_PREEMPT))
1920 return; 1920 return;
1921 1921
1922 update_curr(cfs_rq);
1923 find_matching_se(&se, &pse); 1922 find_matching_se(&se, &pse);
1923 update_curr(cfs_rq_of(se));
1924 BUG_ON(!pse); 1924 BUG_ON(!pse);
1925 if (wakeup_preempt_entity(se, pse) == 1) { 1925 if (wakeup_preempt_entity(se, pse) == 1) {
1926 /* 1926 /*