[PATCH 2/3] NO_IDLE_HZ support patches - add_timer_on needs a check

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



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(+)

diff -puN kernel/timer.c~add_timer_on kernel/timer.c
--- linux-2.6.14-rc1/kernel/timer.c~add_timer_on	2005-09-15 12:48:47.000000000 +0530
+++ linux-2.6.14-rc1-root/kernel/timer.c	2005-09-15 13:33:34.000000000 +0530
@@ -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
 }
 
 

_
-- 


Thanks and Regards,
Srivatsa Vaddagiri,
Linux Technology Center,
IBM Software Labs,
Bangalore, INDIA - 560017
-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to [email protected]
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/

[Index of Archives]     [Kernel Newbies]     [Netfilter]     [Bugtraq]     [Photo]     [Gimp]     [Yosemite News]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Video 4 Linux]     [Linux for the blind]
  Powered by Linux