The patch titled Improve behaviour of spurious IRQ detect has been added to the -mm tree. Its filename is improve-behaviour-of-spurious-irq-detect.patch *** Remember to use Documentation/SubmitChecklist when testing your code *** See http://www.zip.com.au/~akpm/linux/patches/stuff/added-to-mm.txt to find out what to do about this ------------------------------------------------------ Subject: Improve behaviour of spurious IRQ detect From: Alan Cox <alan@xxxxxxxxxxxxxxxxxxx> Currently we handle spurious IRQ activity based upon seeing a lot of invalid interrupts, and we clear things back on the base of lots of valid interrupts. Unfortunately in some cases you get legitimate invalid interrupts caused by timing asynchronicity between the PCI bus and the APIC bus when disabling interrupts and pulling other tricks. In this case although the spurious IRQs are not a problem our unhandled counters didn't clear and they act as a slow running timebomb. (This is effectively what the serial port/tty problem that was fixed by clearing counters when registering a handler showed up) It's easy enough to add a second parameter - time. This means that if we see a regular stream of harmless spurious interrupts which are not harming processing we don't go off and do something stupid like disable the IRQ after a month of running. OTOH lockups and performance killers show up a lot more than 10/second Signed-off-by: Alan Cox <alan@xxxxxxxxxx> Cc: Ingo Molnar <mingo@xxxxxxx> Cc: Thomas Gleixner <tglx@xxxxxxxxxxxxx> Signed-off-by: Andrew Morton <akpm@xxxxxxxxxxxxxxxxxxxx> --- include/linux/irq.h | 1 + kernel/irq/spurious.c | 10 +++++++++- 2 files changed, 10 insertions(+), 1 deletion(-) diff -puN include/linux/irq.h~improve-behaviour-of-spurious-irq-detect include/linux/irq.h --- a/include/linux/irq.h~improve-behaviour-of-spurious-irq-detect +++ a/include/linux/irq.h @@ -161,6 +161,7 @@ struct irq_desc { unsigned int wake_depth; /* nested wake enables */ unsigned int irq_count; /* For detecting broken IRQs */ unsigned int irqs_unhandled; + unsigned long last_unhandled; /* Aging timer for unhandled count */ spinlock_t lock; #ifdef CONFIG_SMP cpumask_t affinity; diff -puN kernel/irq/spurious.c~improve-behaviour-of-spurious-irq-detect kernel/irq/spurious.c --- a/kernel/irq/spurious.c~improve-behaviour-of-spurious-irq-detect +++ a/kernel/irq/spurious.c @@ -172,7 +172,15 @@ void note_interrupt(unsigned int irq, st irqreturn_t action_ret) { if (unlikely(action_ret != IRQ_HANDLED)) { - desc->irqs_unhandled++; + /* If we are seeing only the odd spurious IRQ caused by + bus asynchronicity then don't eventually trigger an error, + otherwise the couter becomes a doomsday timer for otherwise + working systems */ + if (jiffies - desc->last_unhandled > HZ/10) + desc->irqs_unhandled = 1; + else + desc->irqs_unhandled++; + desc->last_unhandled = jiffies; if (unlikely(action_ret != IRQ_NONE)) report_bad_irq(irq, desc, action_ret); } _ Patches currently in -mm which might be from alan@xxxxxxxxxxxxxxxxxxx are lots-of-architectures-enable-arbitary-speed-tty-support.patch ia64-arbitary-speed-tty-ioctl-support.patch git-libata-all.patch pata-add-the-mcp73-77-support-to-pata-driver.patch libata-correct-abuse-of-language.patch libata-core-sff-fix-multiple-assumptions-about-dma.patch libata-fix-hopefully-all-the-remaining-problems-with.patch testing-patch-for-ali-pata-fixes-hopefully-for-the-problems-with-atapi-dma.patch pata_ali-more-work.patch tty-add-the-new-ioctls-and-definitionto-the-mips.patch add-pci_try_set_mwi.patch git-scsi-misc.patch add-pci_try_set_mwi-prism54pci.patch xtensa-enable-arbitary-tty-speed-setting-ioctls.patch blackfin-enable-arbitary-speed-serial-setting.patch h8300-enable-arbitary-speed-tty-port-setup.patch arm26-enable-arbitary-speed-tty-ioctls-and-split.patch m32r-enable-arbitary-speed-tty-rate-setting.patch etrax-enable-arbitary-speed-setting-on-tty-ports.patch v850-enable-arbitary-speed-tty-ioctls.patch doc-kernel-parameters-use-x86-32-tag-instead-of-ia-32.patch make-proc-tty-drivers-use-seq_list_xxx-helpers.patch update-zilog-timeout.patch edd-switch-to-pci_get-based-api.patch mpu401-warning-fixes.patch char-tty_ioctl-use-wait_event_interruptible_timeout.patch char-tty_ioctl-little-whitespace-cleanup.patch intel-rng-undo-mess-made-by-an-80-column-extremist.patch improve-behaviour-of-spurious-irq-detect.patch i2o_cfg_passthru-cleanup.patch i2o_cfg_passthru-cleanup-fix.patch wrong-memory-access-in-i2o_block_device_lock.patch i2o-message-leak-in-i2o_msg_post_wait_mem.patch i2o-proc-reading-oops.patch i2o-debug-output-cleanup.patch coredump-masking-bound-suid_dumpable-sysctl.patch coredump-masking-reimplementation-of-dumpable-using-two-flags.patch coredump-masking-reimplementation-of-dumpable-using-two-flags-fix.patch coredump-masking-add-an-interface-for-core-dump-filter.patch coredump-masking-elf-enable-core-dump-filtering.patch coredump-masking-elf-fdpic-remove-an-unused-argument.patch coredump-masking-elf-fdpic-enable-core-dump-filtering.patch coredump-masking-documentation-for-proc-pid-coredump_filter.patch - To unsubscribe from this list: send the line "unsubscribe mm-commits" in the body of a message to majordomo@xxxxxxxxxxxxxxx More majordomo info at http://vger.kernel.org/majordomo-info.html