diff options
| author | Oleg Nesterov <[email protected]> | 2008-07-25 01:47:50 -0700 |
|---|---|---|
| committer | Linus Torvalds <[email protected]> | 2008-07-25 10:53:40 -0700 |
| commit | 3da1c84c00c7e5fa8348336bd8c342f9128b0f14 (patch) | |
| tree | af960c65a670319fa86846a493a6d97f9fb37cd9 /include/linux/timerqueue.h | |
| parent | 8616a89ab761239c963eea3a63be383f127cc7e8 (diff) | |
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.
[[email protected]: fix CONFIG_SMP=n]
Signed-off-by: Oleg Nesterov <[email protected]>
Acked-by: Gautham R Shenoy <[email protected]>
Cc: Heiko Carstens <[email protected]>
Cc: Max Krasnyansky <[email protected]>
Cc: Paul Jackson <[email protected]>
Cc: Paul Menage <[email protected]>
Cc: Peter Zijlstra <[email protected]>
Cc: Vegard Nossum <[email protected]>
Cc: Martin Schwidefsky <[email protected]>
Cc: Ingo Molnar <[email protected]>
Signed-off-by: Andrew Morton <[email protected]>
Signed-off-by: Linus Torvalds <[email protected]>
Diffstat (limited to 'include/linux/timerqueue.h')
0 files changed, 0 insertions, 0 deletions