]> Pileus Git - ~andy/linux/commit
sched, nohz: Implement sched group, domain aware nohz idle load balancing
authorSuresh Siddha <suresh.b.siddha@intel.com>
Fri, 2 Dec 2011 01:07:34 +0000 (17:07 -0800)
committerIngo Molnar <mingo@elte.hu>
Tue, 6 Dec 2011 08:06:34 +0000 (09:06 +0100)
commit0b005cf54eac170a8f22540ab096a6e07bf49e7c
treed06b2c7d1b6286f4116f94b9d4b38779e885a9b2
parent69e1e811dcc436a6b129dbef273ad9ec22d095ce
sched, nohz: Implement sched group, domain aware nohz idle load balancing

When there are many logical cpu's that enter and exit idle often, members of
the global nohz data structure are getting modified very frequently causing
lot of cache-line contention.

Make the nohz idle load balancing more scalabale by using the sched domain
topology and 'nr_busy_cpu's in the struct sched_group_power.

Idle load balance is kicked on one of the idle cpu's when there is atleast
one idle cpu and:

 - a busy rq having more than one task or

 - a busy rq's scheduler group that share package resources (like HT/MC
   siblings) and has more than one member in that group busy or

 - for the SD_ASYM_PACKING domain, if the lower numbered cpu's in that
   domain are idle compared to the busy ones.

This will help in kicking the idle load balancing request only when
there is a potential imbalance. And once it is mostly balanced, these kicks will
be minimized.

These changes helped improve the workload that is context switch intensive
between number of task pairs by 2x on a 8 socket NHM-EX based system.

Reported-by: Tim Chen <tim.c.chen@intel.com>
Signed-off-by: Suresh Siddha <suresh.b.siddha@intel.com>
Signed-off-by: Peter Zijlstra <a.p.zijlstra@chello.nl>
Cc: Thomas Gleixner <tglx@linutronix.de>
Link: http://lkml.kernel.org/r/20111202010832.602203411@sbsiddha-desk.sc.intel.com
Signed-off-by: Ingo Molnar <mingo@elte.hu>
kernel/sched/fair.c