Re: [PULL] modules-next

From: Rusty Russell
Date: Mon Dec 22 2014 - 19:21:29 EST


Linus Torvalds <torvalds@xxxxxxxxxxxxxxxxxxxx> writes:
> On Thu, Dec 18, 2014 at 4:55 PM, Rusty Russell <rusty@xxxxxxxxxxxxxxx> 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 majordomo@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/