summaryrefslogtreecommitdiffstats
path: root/unhandled-irqs-switch-to-polling.patch
diff options
context:
space:
mode:
authorJosh Boyer <jwboyer@redhat.com>2012-03-12 14:58:06 -0400
committerJosh Boyer <jwboyer@redhat.com>2012-03-12 15:07:45 -0400
commit25313f2bcf2b779b786b049d49e2240c538f6bb7 (patch)
tree5bf49f672407491c5a6f685b8db909d9fc624fd3 /unhandled-irqs-switch-to-polling.patch
parent04412e0aef1b95d47a7d90008b0495fbae55f5ec (diff)
downloadkernel-25313f2bcf2b779b786b049d49e2240c538f6bb7.tar.gz
kernel-25313f2bcf2b779b786b049d49e2240c538f6bb7.tar.xz
kernel-25313f2bcf2b779b786b049d49e2240c538f6bb7.zip
Make the irqpoll patch less chatty (rhbz 800520)
Should look at making the frequency of checking dynamic, but this will help the immediate problem.
Diffstat (limited to 'unhandled-irqs-switch-to-polling.patch')
-rw-r--r--unhandled-irqs-switch-to-polling.patch47
1 files changed, 17 insertions, 30 deletions
diff --git a/unhandled-irqs-switch-to-polling.patch b/unhandled-irqs-switch-to-polling.patch
index 8eb09052b..6eeaf0bec 100644
--- a/unhandled-irqs-switch-to-polling.patch
+++ b/unhandled-irqs-switch-to-polling.patch
@@ -140,16 +140,16 @@ every time during debugging).
Signed-off-by: Jeroen Van den Keybus <jeroen.vandenkeybus@gmail.com>
+
+Make it less chatty. Josh Boyer <jwboyer@redhat.com>
======
-diff -up linux-3.2-rc4.orig/kernel/irq/spurious.c
-linux-3.2-rc4/kernel/irq/spurious.c
---- linux-3.2-rc4.orig/kernel/irq/spurious.c 2011-12-01 23:56:01.000000000 +0100
-+++ linux-3.2-rc4/kernel/irq/spurious.c 2011-12-11 16:14:48.188377387 +0100
+--- linux-2.6.orig/kernel/irq/spurious.c
++++ linux-2.6/kernel/irq/spurious.c
@@ -18,7 +18,7 @@
-
+
static int irqfixup __read_mostly;
-
+
-#define POLL_SPURIOUS_IRQ_INTERVAL (HZ/10)
+#define POLL_SPURIOUS_IRQ_INTERVAL (HZ/100)
static void poll_spurious_irqs(unsigned long dummy);
@@ -161,42 +161,37 @@ linux-3.2-rc4/kernel/irq/spurious.c
struct irq_desc *desc;
- int i;
+ int i, poll_again;
-
+
if (atomic_inc_return(&irq_poll_active) != 1)
goto out;
irq_poll_cpu = smp_processor_id();
-
+
+ poll_again = 0; /* Will stay false as long as no polling candidate is found */
for_each_irq_desc(i, desc) {
- unsigned int state;
+ unsigned int state, irq;
-
+
if (!i)
continue;
-@@ -158,15 +159,33 @@ static void poll_spurious_irqs(unsigned
- barrier();
+@@ -159,14 +160,29 @@ static void poll_spurious_irqs(unsigned
if (!(state & IRQS_SPURIOUS_DISABLED))
continue;
--
+
- local_irq_disable();
- try_one_irq(i, desc, true);
- local_irq_enable();
-+
+ /* We end up here with a disabled spurious interrupt.
+ desc->irqs_unhandled now tracks the number of times
+ the interrupt has been polled */
+
+ irq = desc->irq_data.irq;
+ if (desc->irqs_unhandled < 100) { /* 1 second delay with poll frequency 100 Hz */
-+ if (desc->irqs_unhandled == 0)
-+ printk("Polling IRQ %d\n", irq);
+ local_irq_disable();
+ try_one_irq(i, desc, true);
+ local_irq_enable();
+ desc->irqs_unhandled++;
+ poll_again = 1;
+ } else {
-+ printk("Reenabling IRQ %d\n", irq);
+ irq_enable(desc); /* Reenable the interrupt line */
+ desc->depth--;
+ desc->istate &= (~IRQS_SPURIOUS_DISABLED);
@@ -211,11 +206,11 @@ linux-3.2-rc4/kernel/irq/spurious.c
- mod_timer(&poll_spurious_irq_timer,
- jiffies + POLL_SPURIOUS_IRQ_INTERVAL);
}
-
+
static inline int bad_action_ret(irqreturn_t action_ret)
-@@ -177,11 +196,19 @@ static inline int bad_action_ret(irqretu
+@@ -177,11 +193,19 @@ static inline int bad_action_ret(irqretu
}
-
+
/*
- * If 99,900 of the previous 100,000 interrupts have not been handled
+ * If 9 of the previous 10 interrupts have not been handled
@@ -235,14 +230,14 @@ linux-3.2-rc4/kernel/irq/spurious.c
* functioning device sharing an IRQ with the failing one)
*/
static void
-@@ -302,19 +329,19 @@ void note_interrupt(unsigned int irq, st
+@@ -302,19 +326,19 @@ void note_interrupt(unsigned int irq, st
}
-
+
desc->irq_count++;
- if (likely(desc->irq_count < 100000))
+ if (likely(desc->irq_count < 10))
return;
-
+
desc->irq_count = 0;
- if (unlikely(desc->irqs_unhandled > 99900)) {
+ if (unlikely(desc->irqs_unhandled >= 9)) {
@@ -259,11 +254,3 @@ linux-3.2-rc4/kernel/irq/spurious.c
desc->istate |= IRQS_SPURIOUS_DISABLED;
desc->depth++;
irq_disable(desc);
-
-======
---
-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/
-