Skip to content

Commit

Permalink
softlockup: fix false positives on nohz if CPU is 100% idle for more …
Browse files Browse the repository at this point in the history
…than 60 seconds

Fix (probably theoretical only) rq->clock update bug:
in tick_nohz_update_jiffies() [which is called on all irq
entry on all cpus where the irq entry hits an idle cpu] we
call touch_softlockup_watchdog() before we update jiffies.
That works fine most of the time when idle timeouts are within
60 seconds. But when an idle timeout is beyond 60 seconds,
jiffies is updated with a jump of more than 60 seconds,
which causes a jump in cpu-clock of more than 60 seconds,
triggering a false positive.

Reported-by: David Miller <davem@davemloft.net>
Signed-off-by: Ingo Molnar <mingo@elte.hu>
  • Loading branch information
Ingo Molnar committed May 30, 2008
1 parent 1c4cd6d commit 02ff375
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions kernel/time/tick-sched.c
Original file line number Diff line number Diff line change
Expand Up @@ -133,15 +133,15 @@ void tick_nohz_update_jiffies(void)
if (!ts->tick_stopped)
return;

touch_softlockup_watchdog();

cpu_clear(cpu, nohz_cpu_mask);
now = ktime_get();
ts->idle_waketime = now;

local_irq_save(flags);
tick_do_update_jiffies64(now);
local_irq_restore(flags);

touch_softlockup_watchdog();
}

void tick_nohz_stop_idle(int cpu)
Expand Down

0 comments on commit 02ff375

Please sign in to comment.