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>
Showing
- include/asm-generic/bug.h 3 additions, 0 deletionsinclude/asm-generic/bug.h
- include/linux/kernel.h 2 additions, 6 deletionsinclude/linux/kernel.h
- include/linux/net.h 1 addition, 2 deletionsinclude/linux/net.h
- include/linux/ratelimit.h 27 additions, 0 deletionsinclude/linux/ratelimit.h
- include/linux/rcupreempt.h 7 additions, 2 deletionsinclude/linux/rcupreempt.h
- kernel/printk.c 3 additions, 14 deletionskernel/printk.c
- kernel/sysctl.c 2 additions, 2 deletionskernel/sysctl.c
- lib/ratelimit.c 30 additions, 25 deletionslib/ratelimit.c
- net/core/sysctl_net_core.c 2 additions, 2 deletionsnet/core/sysctl_net_core.c
- net/core/utils.c 2 additions, 3 deletionsnet/core/utils.c
include/linux/ratelimit.h
0 → 100644
Please register or sign in to comment