NO_IDLE_HZ support patches - add_timer_on needs a check
PATCH 2/3 NO_IDLE_HZ support patches - add_timer_on needs a check
add_timer_on needs to check if the target CPU was sleeping. If so it should wakeup the CPU.
Patch below is against 2.6.14-rc1.
Signed-off-by Srivatsa Vaddagiri <[email protected]>
---
linux-2.6.14-rc1-root/kernel/timer.c | 5 +++++ 1 files changed, 5 insertions(+)
kernel/timer.c renamed from kernel/timer.c~add_timer_on +5 -0
@@ -290,6 +290,11 @@ void add_timer_on(struct timer_list *tim timer->base = &base->t_base;internal_add_timer (base, timer);spin_unlock_irqrestore (&base->t_base.lock, flags); +#ifdef CONFIG_NO_IDLE_HZ +/* Wake up any sleeping CPU */ +if (cpu_isset (cpu, nohz_cpu_mask)) +smp_send_reschedule (cpu); +#endif }
_
Signature · 5 lines
Thanks and Regards, Srivatsa Vaddagiri, Linux Technology Center, IBM Software Labs, Bangalore, INDIA - 560017