]> git.baikalelectronics.ru Git - kernel.git/commit
NOHZ: reevaluate idle sleep length after add_timer_on()
authorThomas Gleixner <tglx@linutronix.de>
Sat, 22 Mar 2008 08:20:24 +0000 (09:20 +0100)
committerThomas Gleixner <tglx@linutronix.de>
Wed, 26 Mar 2008 07:28:55 +0000 (08:28 +0100)
commit8a9a1a18971a432877b78519c83654e79ab0724c
treed522e285525964706e7ec112bca23d407a540a8e
parentcd96dac3ca80990bf69a3fd97531496342eaec88
NOHZ: reevaluate idle sleep length after add_timer_on()

add_timer_on() can add a timer on a CPU which is currently in a long
idle sleep, but the timer wheel is not reevaluated by the nohz code on
that CPU. So a timer can be delayed for quite a long time. This
triggered a false positive in the clocksource watchdog code.

To avoid this we need to wake up the idle CPU and enforce the
reevaluation of the timer wheel for the next timer event.

Add a function, which checks a given CPU for idle state, marks the
idle task with NEED_RESCHED and sends a reschedule IPI to notify the
other CPU of the change in the timer wheel.

Call this function from add_timer_on().

Signed-off-by: Thomas Gleixner <tglx@linutronix.de>
Acked-by: Peter Zijlstra <a.p.zijlstra@chello.nl>
Acked-by: Ingo Molnar <mingo@elte.hu>
Cc: stable@kernel.org
--
 include/linux/sched.h |    6 ++++++
 kernel/sched.c        |   43 +++++++++++++++++++++++++++++++++++++++++++
 kernel/timer.c        |   10 +++++++++-
 3 files changed, 58 insertions(+), 1 deletion(-)
include/linux/sched.h
kernel/sched.c
kernel/timer.c