do CPU_DEAD migrating under read_lock(tasklist) instead of write_lock_irq(tasklist)
authorOleg Nesterov <oleg@tv-sign.ru>
Wed, 17 Oct 2007 06:30:56 +0000 (23:30 -0700)
committerLinus Torvalds <torvalds@woody.linux-foundation.org>
Wed, 17 Oct 2007 15:43:03 +0000 (08:43 -0700)
commitf7b4cddcc5aca03e80e357360c9424dfba5056c2
treeaf2eae61dcd0311a4c51dc7398e9d0f049f37367
parentcf7a44168d743ca97863b7f34ed42a45fd7b5ab0
do CPU_DEAD migrating under read_lock(tasklist) instead of write_lock_irq(tasklist)

Currently move_task_off_dead_cpu() is called under
write_lock_irq(tasklist).  This means it can't use task_lock() which is
needed to improve migrating to take task's ->cpuset into account.

Change the code to call move_task_off_dead_cpu() with irqs enabled, and
change migrate_live_tasks() to use read_lock(tasklist).

This all is a preparation for the futher changes proposed by Cliff Wickman, see
http://marc.info/?t=117327786100003

Signed-off-by: Oleg Nesterov <oleg@tv-sign.ru>
Cc: Cliff Wickman <cpw@sgi.com>
Cc: Gautham R Shenoy <ego@in.ibm.com>
Cc: Ingo Molnar <mingo@elte.hu>
Cc: Srivatsa Vaddagiri <vatsa@in.ibm.com>
Cc: Akinobu Mita <akinobu.mita@gmail.com>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
kernel/sched.c