printk ratelimiting rewrite
authorDave Young <hidave.darkstar@gmail.com>
Fri, 25 Jul 2008 08:45:58 +0000 (01:45 -0700)
committerLinus Torvalds <torvalds@linux-foundation.org>
Fri, 25 Jul 2008 17:53:29 +0000 (10:53 -0700)
commit717115e1a5856b57af0f71e1df7149108294fc10
tree9528a992245c2fb993a0cf0bc8221dc7dea5d259
parent2711b793eb62a5873a0ba583a69252040aef176e
printk ratelimiting rewrite

All ratelimit user use same jiffies and burst params, so some messages
(callbacks) will be lost.

For example:
a call printk_ratelimit(5 * HZ, 1)
b call printk_ratelimit(5 * HZ, 1) before the 5*HZ timeout of a, then b will
will be supressed.

- rewrite __ratelimit, and use a ratelimit_state as parameter.  Thanks for
  hints from andrew.

- Add WARN_ON_RATELIMIT, update rcupreempt.h

- remove __printk_ratelimit

- use __ratelimit in net_ratelimit

Signed-off-by: Dave Young <hidave.darkstar@gmail.com>
Cc: "David S. Miller" <davem@davemloft.net>
Cc: "Paul E. McKenney" <paulmck@us.ibm.com>
Cc: Dave Young <hidave.darkstar@gmail.com>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
include/asm-generic/bug.h
include/linux/kernel.h
include/linux/net.h
include/linux/ratelimit.h [new file with mode: 0644]
include/linux/rcupreempt.h
kernel/printk.c
kernel/sysctl.c
lib/ratelimit.c
net/core/sysctl_net_core.c
net/core/utils.c