Skip to content

Commit

Permalink
NOHZ: Rate limit the local softirq pending warning output
Browse files Browse the repository at this point in the history
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 <[email protected]>
Cc: <[email protected]>
Signed-off-by: Andrew Morton <[email protected]>
Signed-off-by: Linus Torvalds <[email protected]>
  • Loading branch information
KAGA-KOKO authored and Linus Torvalds committed May 24, 2007
1 parent 43d4f96 commit 3528231
Showing 1 changed file with 9 additions and 3 deletions.
12 changes: 9 additions & 3 deletions kernel/time/tick-sched.c
Original file line number Diff line number Diff line change
Expand Up @@ -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();
/*
Expand Down

0 comments on commit 3528231

Please sign in to comment.