diff options
author | Paul Turner <pjt@google.com> | 2010-11-16 00:47:03 +0100 |
---|---|---|
committer | Ingo Molnar <mingo@elte.hu> | 2010-11-18 13:27:47 +0100 |
commit | f0d7442a5924a802b66eef79b3708f77297bfb35 (patch) | |
tree | edffcb20dca3dfe7315b128dc8948977c7c27fa8 /kernel/kprobes.c | |
parent | sched: Make tg_shares_up() walk on-demand (diff) | |
download | linux-f0d7442a5924a802b66eef79b3708f77297bfb35.tar.xz linux-f0d7442a5924a802b66eef79b3708f77297bfb35.zip |
sched: Fix load corruption from update_cfs_shares()
As part of enqueue_entity both a new entity weight and its contribution to the
queuing cfs_rq / rq are updated. Since update_cfs_shares will only update the
queueing weights when the entity is on_rq (which in this case it is not yet),
there's a dependency loop here:
update_cfs_shares needs account_entity_enqueue to update cfs_rq->load.weight
account_entity_enqueue needs the updated weight for the queuing cfs_rq load[*]
Fix this and avoid spurious dequeue/enqueues by issuing update_cfs_shares as
if we had accounted the enqueue already.
This was also resulting in rq->load corruption previously.
[*]: this dependency also exists when using the group cfs_rq w/
update_cfs_shares as the weight of the enqueued entity changes
without the load being updated.
Signed-off-by: Paul Turner <pjt@google.com>
Signed-off-by: Peter Zijlstra <a.p.zijlstra@chello.nl>
LKML-Reference: <20101115234937.844900206@google.com>
Signed-off-by: Ingo Molnar <mingo@elte.hu>
Diffstat (limited to 'kernel/kprobes.c')
0 files changed, 0 insertions, 0 deletions