Skip to content

ratelimit: Do not lose messages under limit

Dmitry Safonov dri-devel intel-gfx lkml 1 version In review

Get series with b4
b4 am [email protected]

Versions newest first

  1. v1 Latest2 patches 9 repliesIn review

Patches in v1 No applies recorded yet

#Subject and filesSizeRepliesApplied
1/2random: Omit double-printing ratelimit messagesdrivers/char/random.c include/linux/ratelimit.h+11 -59 replies
2/2lib/ratelimit: Lockless ratelimitingdrivers/char/random.c drivers/gpu/drm/i915/i915_perf.c include/linux/ratelimit.h +1 more+50 -530 replies

Reviews trailers per patch

No Reviewed-by, Acked-by or Tested-by trailers for v1 yet.

Read the v1 thread

Cover letter [PATCH 0/2] ratelimit: Do not lose messages under limit

There are two issues with ratelimiting as far a I can see:
1. Messages may be lost even if their amount fit burst limit;
2. "suppressed" message may not be printed if there is no call to ___ratelimit() after interval ends.

I address (1) issue in the second patch.
While the (2) issue will require adding timers to print "suppressed" message and care if ratelimit is on stack and no more exists. Which looks too much at this point.

Dmitry Safonov (2):
random: Omit double-printing ratelimit messages
lib/ratelimit: Lockless ratelimiting

 drivers/char/random.c            | 22 +++++++--------
 drivers/gpu/drm/i915/i915_perf.c |  4 +--
 include/linux/ratelimit.h        | 34 ++++++++++++++---------
 lib/ratelimit.c                  | 59 +++++++++++++++++++---------------------
 4 files changed, 61 insertions(+), 58 deletions(-)
Signature · 1 line
2.13.6