diff options
author | Paul Turner <pjt@google.com> | 2010-11-15 23:47:03 (GMT) |
---|---|---|
committer | Ingo Molnar <mingo@elte.hu> | 2010-11-18 12:27:47 (GMT) |
commit | f0d7442a5924a802b66eef79b3708f77297bfb35 (patch) | |
tree | edffcb20dca3dfe7315b128dc8948977c7c27fa8 /fs/file.c | |
parent | 9e3081ca61147b29f52fddb4f7c6b6b82ea5eb7a (diff) | |
download | linux-f0d7442a5924a802b66eef79b3708f77297bfb35.tar.xz |
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 'fs/file.c')
0 files changed, 0 insertions, 0 deletions