aboutsummaryrefslogtreecommitdiffstats
path: root/kernel/params.c
diff options
context:
space:
mode:
authorAndi Kleen <andi@firstfloor.org>2008-08-30 04:09:00 -0400
committerRusty Russell <rusty@rustcorp.com.au>2008-10-21 19:00:22 -0400
commitd72b37513cdfbd3f53f3d485a8c403cc96d2c95f (patch)
treebdc0ad7aa94bc52290b42e325ac59c9140faf090 /kernel/params.c
parent5e458cc0f4770eea45d3c07110f01b3a94c72aa5 (diff)
Remove stop_machine during module load v2
Remove stop_machine during module load v2 module loading currently does a stop_machine on each module load to insert the module into the global module lists. Especially on larger systems this can be quite expensive. It does that to handle concurrent lock lessmodule list readers like kallsyms. I don't think stop_machine() is actually needed to insert something into a list though. There are no concurrent writers because the module mutex is taken. And the RCU list functions know how to insert a node into a list with the right memory ordering so that concurrent readers don't go off into the wood. So remove the stop_machine for the module list insert and just do a list_add_rcu() instead. Module removal will still do a stop_machine of course, it needs that for other reasons. v2: Revised readers based on Paul's comments. All readers that only rely on disabled preemption need to be changed to list_for_each_rcu(). Done that. The others are ok because they have the modules mutex. Also added a possible missing preempt disable for print_modules(). [cc Paul McKenney for review. It's not RCU, but quite similar.] Acked-by: Paul E. McKenney <paulmck@linux.vnet.ibm.com> Signed-off-by: Rusty Russell <rusty@rustcorp.com.au>
Diffstat (limited to 'kernel/params.c')
0 files changed, 0 insertions, 0 deletions