Skip to content

Commit

Permalink
Merge branch 'v28-timers-for-linus' of git://git.kernel.org/pub/scm/l…
Browse files Browse the repository at this point in the history
…inux/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
  • Loading branch information
torvalds committed Oct 23, 2008
2 parents 6770ab5 + c4bd822 commit b14ea38
Showing 1 changed file with 11 additions and 1 deletion.
12 changes: 11 additions & 1 deletion kernel/time/tick-sched.c
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down

0 comments on commit b14ea38

Please sign in to comment.