[patch 7/7] x86: Use tick broadcast expired check

From: Thomas Gleixner
Date: Wed Mar 06 2013 - 06:20:14 EST


Avoid going back into deep idle if the tick broadcast IPI is about to
fire.

Signed-off-by: Thomas Gleixner <tglx@xxxxxxxxxxxxx>
Cc: x86@xxxxxxxxxx
---
arch/x86/kernel/process.c | 12 ++++++++++++
1 file changed, 12 insertions(+)

Index: tip/arch/x86/kernel/process.c
===================================================================
--- tip.orig/arch/x86/kernel/process.c
+++ tip/arch/x86/kernel/process.c
@@ -336,6 +336,18 @@ void cpu_idle(void)
local_touch_nmi();
local_irq_disable();

+ /*
+ * We detected in the wakeup path that the
+ * tick broadcast device expired for us, but
+ * we raced with the other CPU and came back
+ * here before it was able to fire the IPI.
+ * No point in going idle.
+ */
+ if (tick_check_broadcast_expired()) {
+ local_irq_enable();
+ continue;
+ }
+
enter_idle();

/* Don't trace irqs off for idle */


--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/