Files
linux-legacy/include/linux
Oleg Nesterov 3da1c84c00 workqueues: make get_online_cpus() useable for work->func()
workqueue_cpu_callback(CPU_DEAD) flushes cwq->thread under
cpu_maps_update_begin().  This means that the multithreaded workqueues
can't use get_online_cpus() due to the possible deadlock, very bad and
very old problem.

Introduce the new state, CPU_POST_DEAD, which is called after
cpu_hotplug_done() but before cpu_maps_update_done().

Change workqueue_cpu_callback() to use CPU_POST_DEAD instead of CPU_DEAD.
This means that create/destroy functions can't rely on get_online_cpus()
any longer and should take cpu_add_remove_lock instead.

[akpm@linux-foundation.org: fix CONFIG_SMP=n]
Signed-off-by: Oleg Nesterov <oleg@tv-sign.ru>
Acked-by: Gautham R Shenoy <ego@in.ibm.com>
Cc: Heiko Carstens <heiko.carstens@de.ibm.com>
Cc: Max Krasnyansky <maxk@qualcomm.com>
Cc: Paul Jackson <pj@sgi.com>
Cc: Paul Menage <menage@google.com>
Cc: Peter Zijlstra <peterz@infradead.org>
Cc: Vegard Nossum <vegard.nossum@gmail.com>
Cc: Martin Schwidefsky <schwidefsky@de.ibm.com>
Cc: Ingo Molnar <mingo@elte.hu>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
2008-07-25 10:53:40 -07:00
..
…
…
…
…
2008-07-25 10:53:30 -07:00
…
2008-07-21 21:55:03 -07:00
…
2008-07-14 14:52:56 -04:00
…
…
2008-07-01 11:28:06 +10:00
…
…
…
…
…
…
…
…
…
…
…
…
…
…
…
…
…
…
…
…
…
…
…
2008-07-24 10:47:24 -07:00
2008-07-24 10:47:33 -07:00
…
…
…
…
2008-07-24 10:47:33 -07:00
…
2008-07-03 13:21:14 +02:00
…
…
…
…
…
…
…
…
…
…
…
…
…
…
2008-07-04 10:40:05 -07:00
…
…
…
2008-07-25 10:53:33 -07:00
…
…
…
…
…
…
…
…
…
…
…
…
…
2008-07-20 17:12:38 -07:00
…
2008-07-22 17:30:57 -07:00
2008-07-11 10:46:50 +02:00
…
2008-07-21 12:00:37 +01:00
…
…
…
…
…
2008-07-21 12:00:37 +01:00
…
…
…
…
…
…
…
…
…
…
…
…
…
…
…
…
…
2008-07-24 10:47:29 -07:00
…
…
…
2008-07-24 10:47:41 -07:00
…
…
…
…
…
…
2008-07-08 17:55:41 +02:00
…
…
2008-07-16 23:27:03 +02:00
2008-07-24 10:47:29 -07:00
2008-07-11 15:49:21 +02:00
…
…
2008-07-20 17:12:36 -07:00
…
2008-07-25 10:53:30 -07:00
…
…
2008-07-20 17:12:36 -07:00
…
…
2008-07-23 15:25:21 +02:00
…
…
…
…
…
…
…
…
…
…
…
…
…
…
…
…
…
…
…
…
…
…
…
…
…
…
…
…
…
…
2008-07-18 18:05:19 -07:00
…
…
…
…
2008-07-14 22:49:06 -07:00
…
2008-07-03 17:51:57 +09:00
…
…
2008-07-25 10:53:39 -07:00
2008-07-25 10:53:28 -07:00
…
…
…
…
…
2008-07-16 23:27:07 +02:00
…
…
…
…
…
…
…
…
…
…
…
…
…
…
2008-07-20 17:12:37 -07:00
…
…
…
…
…
…
…
2008-07-25 10:53:29 -07:00
2008-07-25 10:53:34 -07:00
…
…
…
…
2008-07-25 10:53:29 -07:00
…
…
…
…
…
…
…
2008-07-24 10:47:17 -07:00
…
2008-07-04 10:40:05 -07:00
…
2008-07-20 12:42:32 +03:00
…
2008-07-23 09:49:56 +01:00
…
…
…
…
…
…
…
…
…
…
…
…
…
2008-07-24 10:47:41 -07:00
…
…
…
…
…
…
…
…
…
…
…
2008-07-25 10:53:40 -07:00
…
…
2008-07-24 10:47:24 -07:00
…
…
2008-07-25 10:53:34 -07:00
…
…
…
…
…
…
…
…
…
…
…
2008-07-25 10:53:29 -07:00
…
…
…
…
…
…
…
…
…
…
…
…
…
…
…
…
…
…
2008-07-24 10:47:15 -07:00
…
…
…
2008-07-24 11:50:15 -07:00
…
2008-07-07 16:26:50 -07:00
…
…
…
…
…
…
…
…
…
…
…
…
…
…
…
…
2008-07-22 14:19:19 -07:00
…
…
…
…
2008-07-25 10:53:29 -07:00
…
…
2008-07-04 10:40:07 -07:00
2008-07-25 10:53:29 -07:00
…
…
…
…
…
…
…
…
…
…
…
2008-07-24 10:47:33 -07:00
…
…
…
…
…
…
…
…
…
2008-07-24 10:47:22 -07:00
…
…
2008-07-24 08:31:21 -04:00
…
2008-07-24 10:47:24 -07:00
…
…
…
…
2008-07-14 22:49:06 -07:00
2008-07-24 10:47:21 -07:00
2008-07-04 10:40:04 -07:00
2008-07-25 10:53:30 -07:00
…
…
…
2008-07-04 11:26:40 +02:00
…
…
…
…
…
…
…
…
…
2008-07-20 17:12:37 -07:00
…
…
…
…
…
…
…
…
…
…
…
…
…
…
…
…
…
…
…
…
…
…
…
…
2008-07-22 13:03:28 -07:00
2008-07-20 17:12:34 -07:00
2008-07-22 13:03:27 -07:00
…
…
…
…
…
…
…
…
2008-07-21 15:15:55 -07:00
…
…
…
…
…
…
…
…
…
2008-07-24 10:47:14 -07:00
…
…
…
…
…
2008-07-25 10:53:40 -07:00
…
…
…
…
…
…
…