]> git.kernelconcepts.de Git - karo-tx-linux.git/commit
sched: fix next_interval determination in idle_balance()
authorChristoph Lameter <clameter@sgi.com>
Tue, 19 Jun 2007 19:39:03 +0000 (21:39 +0200)
committerGreg Kroah-Hartman <gregkh@suse.de>
Sat, 4 Aug 2007 16:10:24 +0000 (09:10 -0700)
commitad2aa2d5cd8012db90cdbf32ec11e7fefab57cee
treef7b4347c64e44125a5544e2c563b3f2cdc47c97b
parentc1228d7339dff95df5ea093f174372be5c1268b7
sched: fix next_interval determination in idle_balance()

Fix massive SMP imbalance on NUMA nodes observed on 2.6.21.5 with CFS.
(and later on reproduced without CFS as well).

The intervals of domains that do not have SD_BALANCE_NEWIDLE must be
considered for the calculation of the time of the next balance.
Otherwise we may defer rebalancing forever and nodes might stay idle for
very long times.

Siddha also spotted that the conversion of the balance interval to
jiffies is missing. Fix that to.

From: Srivatsa Vaddagiri <vatsa@linux.vnet.ibm.com>

also continue the loop if !(sd->flags & SD_LOAD_BALANCE).

Tested-by: Paul E. McKenney <paulmck@linux.vnet.ibm.com>
It did in fact trigger under all three of mainline, CFS, and -rt
including CFS -- see below for a couple of emails from last Friday
giving results for these three on the AMD box (where it happened) and on
a single-quad NUMA-Q system (where it did not, at least not with such
severity).

Signed-off-by: Christoph Lameter <clameter@sgi.com>
Signed-off-by: Ingo Molnar <mingo@elte.hu>
Signed-off-by: Chris Wright <chrisw@sous-sol.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
kernel/sched.c