• Christoph Lameter's avatar
    sched: fix next_interval determination in idle_balance() · ad2aa2d5
    Christoph Lameter authored
    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: default avatarPaul 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: default avatarChristoph Lameter <clameter@sgi.com>
    Signed-off-by: default avatarIngo Molnar <mingo@elte.hu>
    Signed-off-by: default avatarChris Wright <chrisw@sous-sol.org>
    Signed-off-by: default avatarGreg Kroah-Hartman <gregkh@suse.de>
    ad2aa2d5
sched.c 173 KB