Skip to content

Commit

Permalink
softlockup: Stop spurious softlockup messages due to overflow
Browse files Browse the repository at this point in the history
Ensure additions on touch_ts do not overflow.  This can occur
when the top 32 bits of the TSC reach 0xffffffff causing
additions to touch_ts to overflow and this in turn generates
spurious softlockup warnings.

Signed-off-by: Colin Ian King <colin.king@canonical.com>
Cc: Peter Zijlstra <a.p.zijlstra@chello.nl>
Cc: Eric Dumazet <eric.dumazet@gmail.com>
Cc: <stable@kernel.org>
LKML-Reference: <1268994482.1798.6.camel@lenovo>
Signed-off-by: Ingo Molnar <mingo@elte.hu>
  • Loading branch information
Colin Ian King authored and Ingo Molnar committed Mar 21, 2010
1 parent 0cff810 commit 8c2eb48
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions kernel/softlockup.c
Original file line number Diff line number Diff line change
Expand Up @@ -155,11 +155,11 @@ void softlockup_tick(void)
* Wake up the high-prio watchdog task twice per
* threshold timespan.
*/
if (now > touch_ts + softlockup_thresh/2)
if (time_after(now - softlockup_thresh/2, touch_ts))
wake_up_process(per_cpu(softlockup_watchdog, this_cpu));

/* Warn about unreasonable delays: */
if (now <= (touch_ts + softlockup_thresh))
if (time_before_eq(now - softlockup_thresh, touch_ts))
return;

per_cpu(softlockup_print_ts, this_cpu) = touch_ts;
Expand Down

0 comments on commit 8c2eb48

Please sign in to comment.