aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorFrederic Weisbecker <fweisbec@gmail.com>2015-12-07 10:55:23 -0500
committerFrederic Weisbecker <fweisbec@gmail.com>2016-02-13 09:34:28 -0500
commit8537bb95a63e4be330359721f0ecd422f4a4c0ca (patch)
tree09ff9ff84c7d1efc45cfa8ad506e9db6d4485506
parent5fd7a09cfb8c6852f596c1f8c891c6158395250e (diff)
nohz: Implement wide kick on top of irq work
It simplifies it and allows wide kick to be performed, even when IRQs are disabled, without an asynchronous level in the middle. This comes at a cost of some more overhead on features like perf and posix cpu timers slow-paths, which is probably not much important for nohz full users. Requested-by: Peter Zijlstra <peterz@infradead.org> Reviewed-by: Chris Metcalf <cmetcalf@ezchip.com> Cc: Christoph Lameter <cl@linux.com> Cc: Chris Metcalf <cmetcalf@ezchip.com> Cc: Ingo Molnar <mingo@kernel.org> Cc: Luiz Capitulino <lcapitulino@redhat.com> Cc: Peter Zijlstra <peterz@infradead.org> Cc: Rik van Riel <riel@redhat.com> Cc: Thomas Gleixner <tglx@linutronix.de> Cc: Viresh Kumar <viresh.kumar@linaro.org> Signed-off-by: Frederic Weisbecker <fweisbec@gmail.com>
-rw-r--r--kernel/time/tick-sched.c12
1 files changed, 4 insertions, 8 deletions
diff --git a/kernel/time/tick-sched.c b/kernel/time/tick-sched.c
index 0b17424349eb..548a4e2551a9 100644
--- a/kernel/time/tick-sched.c
+++ b/kernel/time/tick-sched.c
@@ -234,24 +234,20 @@ void tick_nohz_full_kick_cpu(int cpu)
234 irq_work_queue_on(&per_cpu(nohz_full_kick_work, cpu), cpu); 234 irq_work_queue_on(&per_cpu(nohz_full_kick_work, cpu), cpu);
235} 235}
236 236
237static void nohz_full_kick_ipi(void *info)
238{
239 /* Empty, the tick restart happens on tick_nohz_irq_exit() */
240}
241
242/* 237/*
243 * Kick all full dynticks CPUs in order to force these to re-evaluate 238 * Kick all full dynticks CPUs in order to force these to re-evaluate
244 * their dependency on the tick and restart it if necessary. 239 * their dependency on the tick and restart it if necessary.
245 */ 240 */
246void tick_nohz_full_kick_all(void) 241void tick_nohz_full_kick_all(void)
247{ 242{
243 int cpu;
244
248 if (!tick_nohz_full_running) 245 if (!tick_nohz_full_running)
249 return; 246 return;
250 247
251 preempt_disable(); 248 preempt_disable();
252 smp_call_function_many(tick_nohz_full_mask, 249 for_each_cpu_and(cpu, tick_nohz_full_mask, cpu_online_mask)
253 nohz_full_kick_ipi, NULL, false); 250 tick_nohz_full_kick_cpu(cpu);
254 tick_nohz_full_kick();
255 preempt_enable(); 251 preempt_enable();
256} 252}
257 253