Linus Torvalds <torva...@linux-foundation.org> writes: > On Thu, Dec 18, 2014 at 4:55 PM, Rusty Russell <ru...@rustcorp.com.au> wrote: >> >> The exciting thing here is the getting rid of stop_machine on module >> removal. This is possible by using a simple atomic_t for the counter, >> rather than our fancy per-cpu counter: it turns out that no one is doing >> a module increment per net packet, so the slowdown should be in the noise. > > Famous last words. It may not happen per-packet, but I see > module_get() in various block drivers and in netfilter code etc, and > some of them may be pretty bad. > > Let's see how it all works out.
Indeed. The general pattern is "get on open/init"; get-on-every-use was most useful combined with blocking rmmod, which we removed a few kernels ago (because no one used it). I did a random audit until I got bored, and I put a printk-on-module-get in my kernels for a while, and none of my usecases flood my logs. But it's definitely a risk... Cheers, Rusty. -- To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majord...@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/