summaryrefslogtreecommitdiffstats
path: root/kernel/sched/sched.h
diff options
context:
space:
mode:
authorPeter Zijlstra2016-06-21 14:27:50 +0200
committerIngo Molnar2016-06-27 12:17:54 +0200
commit3d30544f02120b884bba2a9466c87dba980e3be5 (patch)
tree86667a44a8bb7af2365e5bd501fc9b37008b8c24 /kernel/sched/sched.h
parentsched/fair: Fix PELT integrity for new tasks (diff)
downloadkernel-qcow2-linux-3d30544f02120b884bba2a9466c87dba980e3be5.tar.gz
kernel-qcow2-linux-3d30544f02120b884bba2a9466c87dba980e3be5.tar.xz
kernel-qcow2-linux-3d30544f02120b884bba2a9466c87dba980e3be5.zip
sched/fair: Apply more PELT fixes
One additional 'rule' for using update_cfs_rq_load_avg() is that one should call update_tg_load_avg() if it returns true. Add a bunch of comments to hopefully clarify some of the rules: o You need to update cfs_rq _before_ any entity attach/detach, this is important, because while for mathmatical consisency this isn't strictly needed, it is required for the physical interpretation of the model, you attach/detach _now_. o When you modify the cfs_rq avg, you have to then call update_tg_load_avg() in order to propagate changes upwards. o (Fair) entities are always attached, switched_{to,from}_fair() deal with !fair. This directly follows from the definition of the cfs_rq averages, namely that they are a direct sum of all (runnable or blocked) entities on that rq. It is the second rule that this patch enforces, but it adds comments pertaining to all of them. Signed-off-by: Peter Zijlstra (Intel) <peterz@infradead.org> Cc: Linus Torvalds <torvalds@linux-foundation.org> Cc: Mike Galbraith <efault@gmx.de> Cc: Peter Zijlstra <peterz@infradead.org> Cc: Thomas Gleixner <tglx@linutronix.de> Cc: linux-kernel@vger.kernel.org Signed-off-by: Ingo Molnar <mingo@kernel.org>
Diffstat (limited to 'kernel/sched/sched.h')
0 files changed, 0 insertions, 0 deletions