]> git.karo-electronics.de Git - karo-tx-linux.git/commitdiff
[PATCH] NOHZ: Rate limit the local softirq pending warning output
authorThomas Gleixner <tglx@linutronix.de>
Wed, 23 May 2007 20:57:37 +0000 (13:57 -0700)
committerChris Wright <chrisw@sous-sol.org>
Mon, 11 Jun 2007 18:36:44 +0000 (11:36 -0700)
The warning in the NOHZ code, which triggers when a CPU goes idle with
softirqs pending can fill up the logs quite quickly.  Rate limit the output
until we found the root cause of that problem.

Signed-off-by: Thomas Gleixner <tglx@linutronix.de>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Chris Wright <chrisw@sous-sol.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
kernel/time/tick-sched.c

index f4fc867f467d71b8dae84bf2e3f0fffbab955c64..d9a864fba52b826dbe591f5ed149137fa5a20f42 100644 (file)
@@ -167,9 +167,15 @@ void tick_nohz_stop_sched_tick(void)
                goto end;
 
        cpu = smp_processor_id();
-       if (unlikely(local_softirq_pending()))
-               printk(KERN_ERR "NOHZ: local_softirq_pending %02x\n",
-                      local_softirq_pending());
+       if (unlikely(local_softirq_pending())) {
+               static int ratelimit;
+
+               if (ratelimit < 10) {
+                       printk(KERN_ERR "NOHZ: local_softirq_pending %02x\n",
+                              local_softirq_pending());
+                       ratelimit++;
+               }
+       }
 
        now = ktime_get();
        /*