aboutsummaryrefslogtreecommitdiffstats
path: root/kernel
diff options
context:
space:
mode:
authorLinus Torvalds <torvalds@linux-foundation.org>2008-10-23 12:57:16 -0400
committerLinus Torvalds <torvalds@linux-foundation.org>2008-10-23 12:57:16 -0400
commitb14ea38e13686799b9d2545d467a0ec84732981c (patch)
tree0decf621cf4a56eb9c1a2426edb7399bebb4a2e4 /kernel
parent6770ab5cf506f0f00c17a5f063c5506bdc1eb170 (diff)
parentc4bd822e7b12a9008241d76db45b665f2fef180c (diff)
Merge branch 'v28-timers-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/linux-2.6-tip
* 'v28-timers-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/linux-2.6-tip: NOHZ: fix thinko in the timer restart code path
Diffstat (limited to 'kernel')
-rw-r--r--kernel/time/tick-sched.c12
1 files changed, 11 insertions, 1 deletions
diff --git a/kernel/time/tick-sched.c b/kernel/time/tick-sched.c
index 0581c11fe6c6..727c1ae0517a 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)
567static void tick_nohz_kick_tick(int cpu) 567static void tick_nohz_kick_tick(int cpu)
568{ 568{
569 struct tick_sched *ts = &per_cpu(tick_cpu_sched, cpu); 569 struct tick_sched *ts = &per_cpu(tick_cpu_sched, cpu);
570 ktime_t delta, now;
570 571
571 if (!ts->tick_stopped) 572 if (!ts->tick_stopped)
572 return; 573 return;
573 574
574 tick_nohz_restart(ts, ktime_get()); 575 /*
576 * Do not touch the tick device, when the next expiry is either
577 * already reached or less/equal than the tick period.
578 */
579 now = ktime_get();
580 delta = ktime_sub(ts->sched_timer.expires, now);
581 if (delta.tv64 <= tick_period.tv64)
582 return;
583
584 tick_nohz_restart(ts, now);
575} 585}
576 586
577#else 587#else