diff options
author | Paul Turner <pjt@google.com> | 2011-07-07 01:30:37 -0400 |
---|---|---|
committer | Ingo Molnar <mingo@elte.hu> | 2011-07-21 12:01:44 -0400 |
commit | 9598c82dcacadc3b9daa8170613fd054c6124d30 (patch) | |
tree | 1d6c8b5c1aa9882bf9f5f64b68356baf625d23f8 /kernel | |
parent | 9bbd7374361d9bfc75108c3ad1c1b6db28b1be59 (diff) |
sched: Don't update shares twice on on_rq parent
In dequeue_task_fair() we bail on dequeue when we encounter a parenting entity
with additional weight. However, we perform a double shares update on this
entity as we continue the shares update traversal from this point, despite
dequeue_entity() having already updated its queuing cfs_rq.
Avoid this by starting from the parent when we resume.
Signed-off-by: Paul Turner <pjt@google.com>
Signed-off-by: Peter Zijlstra <a.p.zijlstra@chello.nl>
Link: http://lkml.kernel.org/r/20110707053059.797714697@google.com
Signed-off-by: Ingo Molnar <mingo@elte.hu>
Diffstat (limited to 'kernel')
-rw-r--r-- | kernel/sched_fair.c | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/kernel/sched_fair.c b/kernel/sched_fair.c index f88720b3df8b..6cdff849fc19 100644 --- a/kernel/sched_fair.c +++ b/kernel/sched_fair.c | |||
@@ -1370,6 +1370,9 @@ static void dequeue_task_fair(struct rq *rq, struct task_struct *p, int flags) | |||
1370 | */ | 1370 | */ |
1371 | if (task_sleep && parent_entity(se)) | 1371 | if (task_sleep && parent_entity(se)) |
1372 | set_next_buddy(parent_entity(se)); | 1372 | set_next_buddy(parent_entity(se)); |
1373 | |||
1374 | /* avoid re-evaluating load for this entity */ | ||
1375 | se = parent_entity(se); | ||
1373 | break; | 1376 | break; |
1374 | } | 1377 | } |
1375 | flags |= DEQUEUE_SLEEP; | 1378 | flags |= DEQUEUE_SLEEP; |