LKML Archive on lore.kernel.org
help / color / mirror / Atom feed
* [GIT pull] timers bugfix for .28
@ 2008-10-21 19:29 Thomas Gleixner
  0 siblings, 0 replies; only message in thread
From: Thomas Gleixner @ 2008-10-21 19:29 UTC (permalink / raw)
  To: Linus Torvalds
  Cc: Andrew Morton, LKML, Ingo Molnar, Yinghai Lu,
	Venkatesch Pallipadi, Suresh Siddha

Linus,

Please pull the latest v28-timers-for-linus git tree from:

   git://git.kernel.org/pub/scm/linux/kernel/git/tip/linux-2.6-tip.git v28-timers-for-linus

A single bugfix for a brown paperbag thinko introduced by myself.

Thanks,

	tglx 
------------------>
Thomas Gleixner (1):
      NOHZ: fix thinko in the timer restart code path


 kernel/time/tick-sched.c |   12 +++++++++++-
 1 files changed, 11 insertions(+), 1 deletions(-)

diff --git a/kernel/time/tick-sched.c b/kernel/time/tick-sched.c
index 0581c11..727c1ae 100644
--- a/kernel/time/tick-sched.c
+++ b/kernel/time/tick-sched.c
@@ -567,11 +567,21 @@ static void tick_nohz_switch_to_nohz(void)
 static void tick_nohz_kick_tick(int cpu)
 {
 	struct tick_sched *ts = &per_cpu(tick_cpu_sched, cpu);
+	ktime_t delta, now;
 
 	if (!ts->tick_stopped)
 		return;
 
-	tick_nohz_restart(ts, ktime_get());
+	/*
+	 * Do not touch the tick device, when the next expiry is either
+	 * already reached or less/equal than the tick period.
+	 */
+	now = ktime_get();
+	delta =	ktime_sub(ts->sched_timer.expires, now);
+	if (delta.tv64 <= tick_period.tv64)
+		return;
+
+	tick_nohz_restart(ts, now);
 }
 
 #else

^ permalink raw reply	[flat|nested] only message in thread

only message in thread, other threads:[~2008-10-21 19:29 UTC | newest]

Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2008-10-21 19:29 [GIT pull] timers bugfix for .28 Thomas Gleixner

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).