• Nick Piggin's avatar
    [PATCH] debug sched domains before attach · 7f257c1b
    Nick Piggin authored
    Change the sched-domain debug routine to be called on a per-CPU basis, and
    executed before the domain is actually attached to the CPU.  Previously, all
    CPUs would have their new domains attached, and then the debug routine would
    loop over all of them.
    
    This has two advantages: First, there is no longer any theoretical races: we
    are running the debug routine on a domain that isn't yet active, and should
    have no racing access from another CPU.  Second, if there is a problem with a
    domain, the validator will have a better chance to catch the error and print a
    diagnostic _before_ the domain is attached, which may take down the system.
    
    Also, change reporting of detected error conditions to KERN_ERR instead of
    KERN_DEBUG, so they have a better chance of being seen in a hang on boot
    situation.
    
    The patch also does an unrelated (and harmless) cleanup in migration_thread().
    Signed-off-by: default avatarNick Piggin <nickpiggin@yahoo.com.au>
    Acked-by: default avatarIngo Molnar <mingo@elte.hu>
    Signed-off-by: default avatarAndrew Morton <akpm@osdl.org>
    Signed-off-by: default avatarLinus Torvalds <torvalds@osdl.org>
    7f257c1b
sched.c 117 KB