summaryrefslogtreecommitdiffstats
path: root/kernel/timer.c
diff options
context:
space:
mode:
authorLinus Torvalds <torvalds@linux-foundation.org>2008-03-26 11:29:35 -0700
committerLinus Torvalds <torvalds@linux-foundation.org>2008-03-26 11:29:35 -0700
commit8f404faa72f4e458e7bd81ac75ce55ae829e953d (patch)
tree46b70d6d86fc619343b4986160bda5e46b86bb18 /kernel/timer.c
parent729eb528c7e10a4828fece102872ec5255946f64 (diff)
parent06d8308c61e54346585b2691c13ee3f90cb6fb2f (diff)
downloadop-kernel-dev-8f404faa72f4e458e7bd81ac75ce55ae829e953d.zip
op-kernel-dev-8f404faa72f4e458e7bd81ac75ce55ae829e953d.tar.gz
Merge branch 'master' of git://git.kernel.org/pub/scm/linux/kernel/git/tglx/linux-2.6-hrt
* 'master' of git://git.kernel.org/pub/scm/linux/kernel/git/tglx/linux-2.6-hrt: NOHZ: reevaluate idle sleep length after add_timer_on() clocksource: revert: use init_timer_deferrable for clocksource_watchdog
Diffstat (limited to 'kernel/timer.c')
-rw-r--r--kernel/timer.c10
1 files changed, 9 insertions, 1 deletions
diff --git a/kernel/timer.c b/kernel/timer.c
index 99b00a2..b024106 100644
--- a/kernel/timer.c
+++ b/kernel/timer.c
@@ -451,10 +451,18 @@ void add_timer_on(struct timer_list *timer, int cpu)
spin_lock_irqsave(&base->lock, flags);
timer_set_base(timer, base);
internal_add_timer(base, timer);
+ /*
+ * Check whether the other CPU is idle and needs to be
+ * triggered to reevaluate the timer wheel when nohz is
+ * active. We are protected against the other CPU fiddling
+ * with the timer by holding the timer base lock. This also
+ * makes sure that a CPU on the way to idle can not evaluate
+ * the timer wheel.
+ */
+ wake_up_idle_cpu(cpu);
spin_unlock_irqrestore(&base->lock, flags);
}
-
/**
* mod_timer - modify a timer's timeout
* @timer: the timer to be modified
OpenPOWER on IntegriCloud