Re: printk_ratelimited() && proc/sys/kernel/printk_ratelimit*

From: Oleg Nesterov
Date: Wed Mar 20 2019 - 13:48:09 EST


On 03/20, Linus Torvalds wrote:
>
> On Wed, Mar 20, 2019 at 10:03 AM Oleg Nesterov <oleg@xxxxxxxxxx> wrote:
> >
> > At the same time, printk_ratelimited() uses a static ratelimit_state, so user-
> > space can't override the default DEFAULT_RATELIMIT_.* numbers.
> >
> > Isn't it strange? Shouldn't printk_ratelimited() use printk_ratelimit_state ?
>
> No it shouldn't.
>
> Each printk_ratelimited() is independent, and that's very much on purpose.

Damn, I am really stupid.

Oleg.