• Nick Piggin's avatar
    [PATCH] sched: fix SMT scheduling problems · 39507451
    Nick Piggin authored
    SMT balancing has a couple of problems.  Firstly, active_load_balance is too
    complex - basically it should be a dumb helper for when the periodic balancer
    has determined there is an imbalance, but gets stuck because the task is
    running.
    
    So rip out all its "smarts", and just make it move one task to the target CPU.
    
    Second, the busy CPU's sched-domain tree was being used for active balancing.
    This means that it may not see that nr_balance_failed has reached a critical
    level.  So use the target CPU's sched-domain tree for this.  We can do this
    because we hold its runqueue lock.
    
    Lastly, reset nr_balance_failed to a point where we allow cache hot migration.
    This will help ensure active load balancing is successful.
    
    Thanks to Suresh Siddha for pointing out these issues.
    Signed-off-by: default avatarNick Piggin <nickpiggin@yahoo.com.au>
    Signed-off-by: default avatarSuresh Siddha <suresh.b.siddha@intel.com>
    Signed-off-by: default avatarAndrew Morton <akpm@osdl.org>
    Signed-off-by: default avatarLinus Torvalds <torvalds@osdl.org>
    39507451
sched.c 124 KB