lkml.org 
[lkml]   [2007]   [May]   [21]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
    /
    Date
    From
    SubjectRe: [patch 43/69] i386: HPET, check if the counter works
    On Mon, 21 May 2007 21:58:55 +0200
    Thomas Gleixner <tglx@linutronix.de> wrote:

    > 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>
    >
    > Index: linux-2.6.21/kernel/time/tick-sched.c
    > ===================================================================
    > --- linux-2.6.21.orig/kernel/time/tick-sched.c
    > +++ linux-2.6.21/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++;
    > + }
    > + }

    that's not a "rate" limit. I resist the temptation to rename it to "limit"
    to keep mainline and -stable in sync, and coz it's temporary (we hope).
    -
    To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
    the body of a message to majordomo@vger.kernel.org
    More majordomo info at http://vger.kernel.org/majordomo-info.html
    Please read the FAQ at http://www.tux.org/lkml/

    \
     
     \ /
      Last update: 2007-05-22 00:13    [W:2.240 / U:0.016 seconds]
    ©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site