From: Thomas Gleixner Date: Wed, 23 May 2007 20:57:37 +0000 (-0700) Subject: NOHZ: Rate limit the local softirq pending warning output X-Git-Tag: v2.6.22-rc3~73 X-Git-Url: https://err.no/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=352823160613b65fdaa558be486720a71f75ed86;p=linux-2.6 NOHZ: Rate limit the local softirq pending warning output 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 Cc: Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds --- diff --git a/kernel/time/tick-sched.c b/kernel/time/tick-sched.c index 3483e6cb95..3e7ebc4646 100644 --- a/kernel/time/tick-sched.c +++ b/kernel/time/tick-sched.c @@ -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(); /*