]> Pileus Git - ~andy/linux/commitdiff
nohz: Disable the tick when irq resume in full dynticks CPU
authorFrederic Weisbecker <fweisbec@gmail.com>
Sat, 20 Apr 2013 15:43:13 +0000 (17:43 +0200)
committerFrederic Weisbecker <fweisbec@gmail.com>
Mon, 22 Apr 2013 18:29:09 +0000 (20:29 +0200)
Eventually try to disable tick on irq exit, now that the
fundamental infrastructure is in place.

Signed-off-by: Frederic Weisbecker <fweisbec@gmail.com>
Cc: Chris Metcalf <cmetcalf@tilera.com>
Cc: Christoph Lameter <cl@linux.com>
Cc: Geoff Levand <geoff@infradead.org>
Cc: Gilad Ben Yossef <gilad@benyossef.com>
Cc: Hakan Akkan <hakanakkan@gmail.com>
Cc: Ingo Molnar <mingo@kernel.org>
Cc: Kevin Hilman <khilman@linaro.org>
Cc: Li Zhong <zhong@linux.vnet.ibm.com>
Cc: Oleg Nesterov <oleg@redhat.com>
Cc: Paul E. McKenney <paulmck@linux.vnet.ibm.com>
Cc: Paul Gortmaker <paul.gortmaker@windriver.com>
Cc: Peter Zijlstra <peterz@infradead.org>
Cc: Steven Rostedt <rostedt@goodmis.org>
Cc: Thomas Gleixner <tglx@linutronix.de>
kernel/softirq.c

index de15813f2a6647bc1b962577c5d07196131f5a9e..8b1446d4a4dbbe3f1e090bebdeb53f9c9c49f192 100644 (file)
@@ -337,6 +337,19 @@ static inline void invoke_softirq(void)
        }
 }
 
+static inline void tick_irq_exit(void)
+{
+#ifdef CONFIG_NO_HZ_COMMON
+       int cpu = smp_processor_id();
+
+       /* Make sure that timer wheel updates are propagated */
+       if ((idle_cpu(cpu) && !need_resched()) || tick_nohz_full_cpu(cpu)) {
+               if (!in_interrupt())
+                       tick_nohz_irq_exit();
+       }
+#endif
+}
+
 /*
  * Exit an interrupt context. Process softirqs if needed and possible:
  */
@@ -348,11 +361,7 @@ void irq_exit(void)
        if (!in_interrupt() && local_softirq_pending())
                invoke_softirq();
 
-#ifdef CONFIG_NO_HZ_COMMON
-       /* Make sure that timer wheel updates are propagated */
-       if (idle_cpu(smp_processor_id()) && !in_interrupt() && !need_resched())
-               tick_nohz_irq_exit();
-#endif
+       tick_irq_exit();
        rcu_irq_exit();
        sched_preempt_enable_no_resched();
 }