diff options
author | Linus Torvalds <torvalds@linux-foundation.org> | 2008-03-26 11:29:35 -0700 |
---|---|---|
committer | Linus Torvalds <torvalds@linux-foundation.org> | 2008-03-26 11:29:35 -0700 |
commit | 8f404faa72f4e458e7bd81ac75ce55ae829e953d (patch) | |
tree | 46b70d6d86fc619343b4986160bda5e46b86bb18 /kernel/timer.c | |
parent | 729eb528c7e10a4828fece102872ec5255946f64 (diff) | |
parent | 06d8308c61e54346585b2691c13ee3f90cb6fb2f (diff) |
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.c | 10 |
1 files changed, 9 insertions, 1 deletions
diff --git a/kernel/timer.c b/kernel/timer.c index 99b00a25f88b..b024106daa70 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 |