diff options
author | Frederic Weisbecker <fweisbec@gmail.com> | 2013-04-20 11:43:13 -0400 |
---|---|---|
committer | Frederic Weisbecker <fweisbec@gmail.com> | 2013-04-22 14:29:09 -0400 |
commit | 67826eae8c16dbf00c262be6ec15021bb42f69c4 (patch) | |
tree | cbfc0c729a86e1d3e9fbcdfc0a085bd5b740c128 /kernel/softirq.c | |
parent | 99e5ada9407cc19d7c4c05ce2165f20dc46fc093 (diff) |
nohz: Disable the tick when irq resume in full dynticks CPU
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>
Diffstat (limited to 'kernel/softirq.c')
-rw-r--r-- | kernel/softirq.c | 19 |
1 files changed, 14 insertions, 5 deletions
diff --git a/kernel/softirq.c b/kernel/softirq.c index de15813f2a66..8b1446d4a4db 100644 --- a/kernel/softirq.c +++ b/kernel/softirq.c | |||
@@ -337,6 +337,19 @@ static inline void invoke_softirq(void) | |||
337 | } | 337 | } |
338 | } | 338 | } |
339 | 339 | ||
340 | static inline void tick_irq_exit(void) | ||
341 | { | ||
342 | #ifdef CONFIG_NO_HZ_COMMON | ||
343 | int cpu = smp_processor_id(); | ||
344 | |||
345 | /* Make sure that timer wheel updates are propagated */ | ||
346 | if ((idle_cpu(cpu) && !need_resched()) || tick_nohz_full_cpu(cpu)) { | ||
347 | if (!in_interrupt()) | ||
348 | tick_nohz_irq_exit(); | ||
349 | } | ||
350 | #endif | ||
351 | } | ||
352 | |||
340 | /* | 353 | /* |
341 | * Exit an interrupt context. Process softirqs if needed and possible: | 354 | * Exit an interrupt context. Process softirqs if needed and possible: |
342 | */ | 355 | */ |
@@ -348,11 +361,7 @@ void irq_exit(void) | |||
348 | if (!in_interrupt() && local_softirq_pending()) | 361 | if (!in_interrupt() && local_softirq_pending()) |
349 | invoke_softirq(); | 362 | invoke_softirq(); |
350 | 363 | ||
351 | #ifdef CONFIG_NO_HZ_COMMON | 364 | tick_irq_exit(); |
352 | /* Make sure that timer wheel updates are propagated */ | ||
353 | if (idle_cpu(smp_processor_id()) && !in_interrupt() && !need_resched()) | ||
354 | tick_nohz_irq_exit(); | ||
355 | #endif | ||
356 | rcu_irq_exit(); | 365 | rcu_irq_exit(); |
357 | sched_preempt_enable_no_resched(); | 366 | sched_preempt_enable_no_resched(); |
358 | } | 367 | } |