public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
From: Srivatsa Vaddagiri <vatsa@in.ibm.com>
To: linux-kernel@vger.kernel.org
Cc: Andrew Morton <akpm@osdl.org>,
	george@mvista.com, johnstul@us.ibm.com, nacc@us.ibm.com,
	schwidefsky@de.ibm.com
Subject: [PATCH 2/3] NO_IDLE_HZ support patches - add_timer_on needs a check
Date: Thu, 15 Sep 2005 14:21:10 +0530	[thread overview]
Message-ID: <20050915085110.GC10191@in.ibm.com> (raw)

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 <vatsa@in.ibm.com>

---

 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

                 reply	other threads:[~2005-09-15  8:51 UTC|newest]

Thread overview: [no followups] expand[flat|nested]  mbox.gz  Atom feed

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20050915085110.GC10191@in.ibm.com \
    --to=vatsa@in.ibm.com \
    --cc=akpm@osdl.org \
    --cc=george@mvista.com \
    --cc=johnstul@us.ibm.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=nacc@us.ibm.com \
    --cc=schwidefsky@de.ibm.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox