linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Linus Torvalds <torvalds@linux-foundation.org>
To: Oleg Nesterov <oleg@redhat.com>
Cc: Andrew Morton <akpm@linux-foundation.org>,
	Ingo Molnar <mingo@kernel.org>,
	Steffen Froemer <sfroemer@redhat.com>,
	Linux List Kernel Mailing <linux-kernel@vger.kernel.org>
Subject: Re: printk_ratelimited() && proc/sys/kernel/printk_ratelimit*
Date: Wed, 20 Mar 2019 10:30:08 -0700	[thread overview]
Message-ID: <CAHk-=wg9-SK6QDhWvgy+7FkV4Q-d0Ae5p3RcAHoKQtRySn9z8g@mail.gmail.com> (raw)
In-Reply-To: <20190320170342.GA11770@redhat.com>

On Wed, Mar 20, 2019 at 10:03 AM Oleg Nesterov <oleg@redhat.com> 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.

One screaming printk shouldn't mean that every *other* printk would be shut up.

That said, it's likely true that nobody should really use
printk_ratelimited() anyway. But if two different users do, they
definitely shouldn't then affect each other.

                Linus

  reply	other threads:[~2019-03-20 17:30 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2019-03-20 17:03 printk_ratelimited() && proc/sys/kernel/printk_ratelimit* Oleg Nesterov
2019-03-20 17:30 ` Linus Torvalds [this message]
2019-03-20 17:48   ` Oleg Nesterov

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to='CAHk-=wg9-SK6QDhWvgy+7FkV4Q-d0Ae5p3RcAHoKQtRySn9z8g@mail.gmail.com' \
    --to=torvalds@linux-foundation.org \
    --cc=akpm@linux-foundation.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=mingo@kernel.org \
    --cc=oleg@redhat.com \
    --cc=sfroemer@redhat.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).