Blame SOURCES/irqbalance-1.0.8-Balance-correctly-IRQs-reappearing.patch

e9cd91
From 93ed80181e0ce7b81bc88a67fabad1ad829fc460 Mon Sep 17 00:00:00 2001
e9cd91
From: Frediano Ziglio <frediano.ziglio@citrix.com>
e9cd91
Date: Wed, 2 Jul 2014 12:59:34 +0100
e9cd91
Subject: [PATCH 1/1] Balance correctly IRQs reappearing
e9cd91
e9cd91
If IRQ disappears and reappears later (this happens frequently for Xen)
e9cd91
the IRQ is not balanced correctly due to overflow in irq_count (as the
e9cd91
counter got smaller and difference cause overflow).
e9cd91
Rescan if this happens fix the problem.
e9cd91
e9cd91
Signed-off-by: Frediano Ziglio <frediano.ziglio@citrix.com>
e9cd91
---
e9cd91
 procinterrupts.c | 8 ++++++++
e9cd91
 1 file changed, 8 insertions(+)
e9cd91
e9cd91
diff --git a/procinterrupts.c b/procinterrupts.c
e9cd91
index 6a6bdaa..3476473 100644
e9cd91
--- a/procinterrupts.c
e9cd91
+++ b/procinterrupts.c
e9cd91
@@ -181,6 +181,14 @@ void parse_proc_interrupts(void)
e9cd91
 			break;
e9cd91
 		}
e9cd91
 
e9cd91
+		/* IRQ removed and reinserted, need restart or this will
e9cd91
+		 * cause an overflow and IRQ won't be rebalanced again
e9cd91
+		 */
e9cd91
+		if (count < info->irq_count) {
e9cd91
+			need_rescan = 1;
e9cd91
+			break;
e9cd91
+		}
e9cd91
+
e9cd91
 		info->last_irq_count = info->irq_count;		
e9cd91
 		info->irq_count = count;
e9cd91
 
e9cd91
-- 
e9cd91
2.16.1
e9cd91