]> www.pilppa.org Git - linux-2.6-omap-h63xx.git/commit
stop_machine: use workqueues instead of kernel threads
authorHeiko Carstens <heiko.carstens@de.ibm.com>
Mon, 13 Oct 2008 21:50:10 +0000 (23:50 +0200)
committerRusty Russell <rusty@rustcorp.com.au>
Tue, 21 Oct 2008 23:00:26 +0000 (10:00 +1100)
commitc9583e55fa2b08a230c549bd1e3c0bde6c50d9cc
treeec535aced7cdf7390290a4bf61402346b166c07b
parent0d557dc97f4bb501f086a03d0f00b99a7855d794
stop_machine: use workqueues instead of kernel threads

Convert stop_machine to a workqueue based approach. Instead of using kernel
threads for stop_machine we now use a an rt workqueue to synchronize all
cpus.
This has the advantage that all needed per cpu threads are already created
when stop_machine gets called. And therefore a call to stop_machine won't
fail anymore. This is needed for s390 which needs a mechanism to synchronize
all cpus without allocating any memory.
As Rusty pointed out free_module() needs a non-failing stop_machine interface
as well.

As a side effect the stop_machine code gets simplified.

Signed-off-by: Heiko Carstens <heiko.carstens@de.ibm.com>
Signed-off-by: Rusty Russell <rusty@rustcorp.com.au>
kernel/stop_machine.c