LKML Archive on lore.kernel.org
help / color / mirror / Atom feed
From: Dmitry Safonov <dima@arista.com>
To: "Theodore Y. Ts'o" <tytso@mit.edu>
Cc: linux-kernel@vger.kernel.org, 0x7f454c46@gmail.com,
Arnd Bergmann <arnd@arndb.de>
Subject: Re: [PATCH 1/2] random: Omit double-printing ratelimit messages
Date: Wed, 16 May 2018 23:11:55 +0100 [thread overview]
Message-ID: <1526508715.28243.34.camel@arista.com> (raw)
In-Reply-To: <20180516205437.GB4378@thunk.org>
On Wed, 2018-05-16 at 16:54 -0400, Theodore Y. Ts'o wrote:
> On Wed, May 16, 2018 at 04:46:13PM +0100, Dmitry Safonov wrote:
> > > Yeah, but what you print is not total sum, it's since the last
> > > interval because without mentioned flag ___ratelimit() will flush
> > > missed counter and print "suppressed" message. They might even
> > > double if say other proccess has called get_random_bytes() got to
> > > ___ratelimit() and got preempted. This thread finishes
> > > initializing random driver and prints this not-proper-sum
> > > statistics, and when the code flow is back in the first context,
> > > it will print statistics again from ___ratelimit() function.
> >
> > So, does it make sense to you, Theodore?
> > If not - I'll just resend second patch rebasing and dropping this
> > one.
>
> Yes, it's correct that it's not the total sum. I guess your
> complaint
> is that some of the messages are using the "callbacks suppressed"
> message, and the last one is using the random drvier's custom message
> which I think is much more user-friendly. That being said, although
> I
> think "callbacks suppressed is a terrible message, I agree that using
> a single message makes more sense. So setting the
> RATELIMIT_MSG_ON_RELEASE and then calling ratelimit_state_exit() from
> crng_reseed() does make sense.
>
> In the future I'd like to push for some way to customize --- or
> perhaps just fix --- "callbacks suppressed" to something more sane
> like, "messages ratelimited", but that's more of an aesthetics issue.
Thanks, Ted.
As you've looked inside lib/ratelimit, care to review 2 patch from the
series maybe?
--
Thanks,
Dmitry
next prev parent reply other threads:[~2018-05-16 22:12 UTC|newest]
Thread overview: 12+ messages / expand[flat|nested] mbox.gz Atom feed top
2018-05-10 12:52 [PATCH 0/2] ratelimit: Do not lose messages under limit Dmitry Safonov
2018-05-10 12:52 ` [PATCH 1/2] random: Omit double-printing ratelimit messages Dmitry Safonov
2018-05-10 18:19 ` Theodore Y. Ts'o
2018-05-10 18:37 ` Dmitry Safonov
2018-05-10 19:40 ` Theodore Y. Ts'o
2018-05-10 19:50 ` Dmitry Safonov
2018-05-11 3:51 ` Theodore Y. Ts'o
2018-05-11 12:41 ` Dmitry Safonov
2018-05-16 15:46 ` Dmitry Safonov
2018-05-16 20:54 ` Theodore Y. Ts'o
2018-05-16 22:11 ` Dmitry Safonov [this message]
2018-05-10 12:52 ` [PATCH 2/2] lib/ratelimit: Lockless ratelimiting Dmitry Safonov
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=1526508715.28243.34.camel@arista.com \
--to=dima@arista.com \
--cc=0x7f454c46@gmail.com \
--cc=arnd@arndb.de \
--cc=linux-kernel@vger.kernel.org \
--cc=tytso@mit.edu \
--subject='Re: [PATCH 1/2] random: Omit double-printing ratelimit messages' \
/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
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).