diff options
author | Thomas Gleixner <tglx@linutronix.de> | 2007-05-23 16:57:37 -0400 |
---|---|---|
committer | Linus Torvalds <torvalds@woody.linux-foundation.org> | 2007-05-23 23:14:11 -0400 |
commit | 352823160613b65fdaa558be486720a71f75ed86 (patch) | |
tree | 772f0aa4c31c26f3c762baae41a288b72ce7dee7 | |
parent | 43d4f961a87509b4ea5c1d6f02751aef360a632f (diff) |
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 <tglx@linutronix.de>
Cc: <stable@kernel.org>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
-rw-r--r-- | kernel/time/tick-sched.c | 12 |
1 files changed, 9 insertions, 3 deletions
diff --git a/kernel/time/tick-sched.c b/kernel/time/tick-sched.c index 3483e6cb9549..3e7ebc4646b7 100644 --- a/kernel/time/tick-sched.c +++ b/kernel/time/tick-sched.c | |||
@@ -167,9 +167,15 @@ void tick_nohz_stop_sched_tick(void) | |||
167 | goto end; | 167 | goto end; |
168 | 168 | ||
169 | cpu = smp_processor_id(); | 169 | cpu = smp_processor_id(); |
170 | if (unlikely(local_softirq_pending())) | 170 | if (unlikely(local_softirq_pending())) { |
171 | printk(KERN_ERR "NOHZ: local_softirq_pending %02x\n", | 171 | static int ratelimit; |
172 | local_softirq_pending()); | 172 | |
173 | if (ratelimit < 10) { | ||
174 | printk(KERN_ERR "NOHZ: local_softirq_pending %02x\n", | ||
175 | local_softirq_pending()); | ||
176 | ratelimit++; | ||
177 | } | ||
178 | } | ||
173 | 179 | ||
174 | now = ktime_get(); | 180 | now = ktime_get(); |
175 | /* | 181 | /* |