aboutsummaryrefslogtreecommitdiffstats
path: root/kernel/sysctl.c
diff options
context:
space:
mode:
authorDave Young <hidave.darkstar@gmail.com>2008-07-25 04:45:58 -0400
committerLinus Torvalds <torvalds@linux-foundation.org>2008-07-25 13:53:29 -0400
commit717115e1a5856b57af0f71e1df7149108294fc10 (patch)
tree9528a992245c2fb993a0cf0bc8221dc7dea5d259 /kernel/sysctl.c
parent2711b793eb62a5873a0ba583a69252040aef176e (diff)
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>
Diffstat (limited to 'kernel/sysctl.c')
-rw-r--r--kernel/sysctl.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/kernel/sysctl.c b/kernel/sysctl.c
index 1a8299d1fe59..35a50db9b6ce 100644
--- a/kernel/sysctl.c
+++ b/kernel/sysctl.c
@@ -624,7 +624,7 @@ static struct ctl_table kern_table[] = {
624 { 624 {
625 .ctl_name = KERN_PRINTK_RATELIMIT, 625 .ctl_name = KERN_PRINTK_RATELIMIT,
626 .procname = "printk_ratelimit", 626 .procname = "printk_ratelimit",
627 .data = &printk_ratelimit_jiffies, 627 .data = &printk_ratelimit_state.interval,
628 .maxlen = sizeof(int), 628 .maxlen = sizeof(int),
629 .mode = 0644, 629 .mode = 0644,
630 .proc_handler = &proc_dointvec_jiffies, 630 .proc_handler = &proc_dointvec_jiffies,
@@ -633,7 +633,7 @@ static struct ctl_table kern_table[] = {
633 { 633 {
634 .ctl_name = KERN_PRINTK_RATELIMIT_BURST, 634 .ctl_name = KERN_PRINTK_RATELIMIT_BURST,
635 .procname = "printk_ratelimit_burst", 635 .procname = "printk_ratelimit_burst",
636 .data = &printk_ratelimit_burst, 636 .data = &printk_ratelimit_state.burst,
637 .maxlen = sizeof(int), 637 .maxlen = sizeof(int),
638 .mode = 0644, 638 .mode = 0644,
639 .proc_handler = &proc_dointvec, 639 .proc_handler = &proc_dointvec,