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: Nick Piggin <nickpiggin@yahoo.com.au> Acked-by: Ingo Molnar <mingo@elte.hu> Signed-off-by: Andrew Morton <akpm@osdl.org> Signed-off-by: Linus Torvalds <torvalds@osdl.org>