From: Anton Blanchard <anton@samba.org>

I made a few changes, basically the burst parameter is now in units of
messages, makes much more sense than the old net ratelimit one.

I also screwed up adding a sysctl_jiffies strategy for the burst parameter.



---

 Documentation/sysctl/kernel.txt |    4 ++--
 kernel/sysctl.c                 |    1 -
 net/core/sysctl_net_core.c      |    3 +--
 net/core/utils.c                |    2 +-
 4 files changed, 4 insertions(+), 6 deletions(-)

diff -puN Documentation/sysctl/kernel.txt~printk-rate_limit-fixes Documentation/sysctl/kernel.txt
--- 25/Documentation/sysctl/kernel.txt~printk-rate_limit-fixes	2004-01-21 01:30:49.000000000 -0800
+++ 25-akpm/Documentation/sysctl/kernel.txt	2004-01-21 01:30:49.000000000 -0800
@@ -254,8 +254,8 @@ the different loglevels.
 printk_ratelimit:
 
 Some warning messages are rate limited. printk_ratelimit specifies
-the minimum length of time between these messages, by default we
-allow one every 5 seconds.
+the minimum length of time between these messages (in jiffies), by
+default we allow one every 5 seconds.
 
 A value of 0 will disable rate limiting.
 
diff -puN kernel/sysctl.c~printk-rate_limit-fixes kernel/sysctl.c
--- 25/kernel/sysctl.c~printk-rate_limit-fixes	2004-01-21 01:30:49.000000000 -0800
+++ 25-akpm/kernel/sysctl.c	2004-01-21 01:30:49.000000000 -0800
@@ -598,7 +598,6 @@ static ctl_table kern_table[] = {
 		.maxlen		= sizeof(int),
 		.mode		= 0644,
 		.proc_handler	= &proc_dointvec,
-		.strategy	= &sysctl_jiffies,
 	},
 	{ .ctl_name = 0 }
 };
diff -puN net/core/sysctl_net_core.c~printk-rate_limit-fixes net/core/sysctl_net_core.c
--- 25/net/core/sysctl_net_core.c~printk-rate_limit-fixes	2004-01-21 01:30:49.000000000 -0800
+++ 25-akpm/net/core/sysctl_net_core.c	2004-01-21 01:30:49.000000000 -0800
@@ -155,8 +155,7 @@ ctl_table core_table[] = {
 		.data		= &net_msg_burst,
 		.maxlen		= sizeof(int),
 		.mode		= 0644,
-		.proc_handler	= &proc_dointvec_jiffies,
-		.strategy	= &sysctl_jiffies,
+		.proc_handler	= &proc_dointvec,
 	},
 	{
 		.ctl_name	= NET_CORE_OPTMEM_MAX,
diff -puN net/core/utils.c~printk-rate_limit-fixes net/core/utils.c
--- 25/net/core/utils.c~printk-rate_limit-fixes	2004-01-21 01:30:49.000000000 -0800
+++ 25-akpm/net/core/utils.c	2004-01-21 01:30:49.000000000 -0800
@@ -38,7 +38,7 @@ void net_srandom(unsigned long entropy)
 }
 
 int net_msg_cost = 5*HZ;
-int net_msg_burst = 10*5*HZ;
+int net_msg_burst = 10;
 
 /* 
  * All net warning printk()s should be guarded by this function.

_