]> err.no Git - linux-2.6/commitdiff
RTC: Ratelimit "lost interrupts" message
authorBen Collins <bcollins@ubuntu.com>
Mon, 16 Jul 2007 06:40:11 +0000 (23:40 -0700)
committerLinus Torvalds <torvalds@woody.linux-foundation.org>
Mon, 16 Jul 2007 16:05:43 +0000 (09:05 -0700)
We gets lots of these when the kernel is running on a hypervisor.  Zach says
"a guest kernel trying to get high frequency RTC will also be inaccurate, and
inevitably will have unhidable interrupt lateness."

Signed-off-by: Ben Collins <bcollins@ubuntu.com>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
drivers/char/rtc.c

index 20380a2c4dee400c877a44bdc92010b467130c7d..22cf7aa56cc470f6b04d464547c0cfc8a716efdf 100644 (file)
@@ -1159,7 +1159,8 @@ static void rtc_dropped_irq(unsigned long data)
 
        spin_unlock_irq(&rtc_lock);
 
-       printk(KERN_WARNING "rtc: lost some interrupts at %ldHz.\n", freq);
+       if (printk_ratelimit())
+               printk(KERN_WARNING "rtc: lost some interrupts at %ldHz.\n", freq);
 
        /* Now we have new data */
        wake_up_interruptible(&rtc_wait);