sched, cgroup: Optimize load_balance_fair()
authorPeter Zijlstra <a.p.zijlstra@chello.nl>
Wed, 13 Jul 2011 11:09:25 +0000 (13:09 +0200)
committerIngo Molnar <mingo@elte.hu>
Thu, 21 Jul 2011 16:01:46 +0000 (18:01 +0200)
commit9763b67fb9f3050c6da739105888327587c30c4d
tree822e6a5243c3d872f86d9c9b980896bc4cd8a491
parent9598c82dcacadc3b9daa8170613fd054c6124d30
sched, cgroup: Optimize load_balance_fair()

Use for_each_leaf_cfs_rq() instead of list_for_each_entry_rcu(), this
achieves that load_balance_fair() only iterates those task_groups that
actually have tasks on busiest, and that we iterate bottom-up, trying to
move light groups before the heavier ones.

No idea if it will actually work out to be beneficial in practice, does
anybody have a cgroup workload that might show a difference one way or
the other?

[ Also move update_h_load to sched_fair.c, loosing #ifdef-ery ]

Signed-off-by: Peter Zijlstra <a.p.zijlstra@chello.nl>
Reviewed-by: Paul Turner <pjt@google.com>
Link: http://lkml.kernel.org/r/1310557009.2586.28.camel@twins
Signed-off-by: Ingo Molnar <mingo@elte.hu>
kernel/sched.c
kernel/sched_fair.c