diff options
author | Dave Young <hidave.darkstar@gmail.com> | 2008-07-25 04:45:58 -0400 |
---|---|---|
committer | Linus Torvalds <torvalds@linux-foundation.org> | 2008-07-25 13:53:29 -0400 |
commit | 717115e1a5856b57af0f71e1df7149108294fc10 (patch) | |
tree | 9528a992245c2fb993a0cf0bc8221dc7dea5d259 /include/linux/net.h | |
parent | 2711b793eb62a5873a0ba583a69252040aef176e (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 'include/linux/net.h')
-rw-r--r-- | include/linux/net.h | 3 |
1 files changed, 1 insertions, 2 deletions
diff --git a/include/linux/net.h b/include/linux/net.h index 2f999fbb188d..4a9a30f2d68f 100644 --- a/include/linux/net.h +++ b/include/linux/net.h | |||
@@ -351,8 +351,7 @@ static const struct proto_ops name##_ops = { \ | |||
351 | 351 | ||
352 | #ifdef CONFIG_SYSCTL | 352 | #ifdef CONFIG_SYSCTL |
353 | #include <linux/sysctl.h> | 353 | #include <linux/sysctl.h> |
354 | extern int net_msg_cost; | 354 | extern struct ratelimit_state net_ratelimit_state; |
355 | extern int net_msg_burst; | ||
356 | #endif | 355 | #endif |
357 | 356 | ||
358 | #endif /* __KERNEL__ */ | 357 | #endif /* __KERNEL__ */ |