aboutsummaryrefslogtreecommitdiffstats
path: root/kernel/timer.c
diff options
context:
space:
mode:
authorFrederic Weisbecker <fweisbec@gmail.com>2011-08-10 17:21:01 -0400
committerFrederic Weisbecker <fweisbec@gmail.com>2013-03-21 10:55:59 -0400
commit1c20091e77fc5a9b7d7d905176443b4822a23cdb (patch)
treeef3c2edc749ccfc87b5f9682973f54414de746c3 /kernel/timer.c
parenta382bf934449ddeb625167537ae81daa0211b477 (diff)
nohz: Wake up full dynticks CPUs when a timer gets enqueued
Wake up a CPU when a timer list timer is enqueued there and the target is part of the full dynticks range. Sending an IPI to it makes it reconsidering the next timer to program on top of recent updates. This may later be improved by checking if the tick is really stopped on the target. This would need some careful synchronization though. So deal with such optimization later and start simple. Signed-off-by: Frederic Weisbecker <fweisbec@gmail.com> Cc: Andrew Morton <akpm@linux-foundation.org> 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: Namhyung Kim <namhyung.kim@lge.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/timer.c')
-rw-r--r--kernel/timer.c12
1 files changed, 6 insertions, 6 deletions
diff --git a/kernel/timer.c b/kernel/timer.c
index dbf7a78a1ef1..4e3040b40d16 100644
--- a/kernel/timer.c
+++ b/kernel/timer.c
@@ -930,14 +930,14 @@ void add_timer_on(struct timer_list *timer, int cpu)
930 debug_activate(timer, timer->expires); 930 debug_activate(timer, timer->expires);
931 internal_add_timer(base, timer); 931 internal_add_timer(base, timer);
932 /* 932 /*
933 * Check whether the other CPU is idle and needs to be 933 * Check whether the other CPU is in dynticks mode and needs
934 * triggered to reevaluate the timer wheel when nohz is 934 * to be triggered to reevaluate the timer wheel.
935 * active. We are protected against the other CPU fiddling 935 * We are protected against the other CPU fiddling
936 * with the timer by holding the timer base lock. This also 936 * with the timer by holding the timer base lock. This also
937 * makes sure that a CPU on the way to idle can not evaluate 937 * makes sure that a CPU on the way to stop its tick can not
938 * the timer wheel. 938 * evaluate the timer wheel.
939 */ 939 */
940 wake_up_idle_cpu(cpu); 940 wake_up_nohz_cpu(cpu);
941 spin_unlock_irqrestore(&base->lock, flags); 941 spin_unlock_irqrestore(&base->lock, flags);
942} 942}
943EXPORT_SYMBOL_GPL(add_timer_on); 943EXPORT_SYMBOL_GPL(add_timer_on);