lkml.org 
[lkml]   [2018]   [May]   [16]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
SubjectRe: [PATCH 1/2] random: Omit double-printing ratelimit messages
From
Date
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

\
 
 \ /
  Last update: 2018-05-17 00:12    [W:0.067 / U:0.076 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site