Commit 7b6c1753 authored by Colin Ian King's avatar Colin Ian King Committed by Greg Kroah-Hartman

softlockup: Stop spurious softlockup messages due to overflow

commit 8c2eb480 upstream.

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: default avatarColin Ian King <colin.king@canonical.com>
Cc: Peter Zijlstra <a.p.zijlstra@chello.nl>
Cc: Eric Dumazet <eric.dumazet@gmail.com>
LKML-Reference: <1268994482.1798.6.camel@lenovo>
Signed-off-by: default avatarIngo Molnar <mingo@elte.hu>
Signed-off-by: default avatarGreg Kroah-Hartman <gregkh@suse.de>
parent 893b328f
...@@ -140,11 +140,11 @@ void softlockup_tick(void) ...@@ -140,11 +140,11 @@ void softlockup_tick(void)
* Wake up the high-prio watchdog task twice per * Wake up the high-prio watchdog task twice per
* threshold timespan. * threshold timespan.
*/ */
if (now > touch_timestamp + softlockup_thresh/2) if (time_after(now - softlockup_thresh/2, touch_timestamp))
wake_up_process(per_cpu(watchdog_task, this_cpu)); wake_up_process(per_cpu(watchdog_task, this_cpu));
/* Warn about unreasonable delays: */ /* Warn about unreasonable delays: */
if (now <= (touch_timestamp + softlockup_thresh)) if (time_before_eq(now - softlockup_thresh, touch_timestamp))
return; return;
per_cpu(print_timestamp, this_cpu) = touch_timestamp; per_cpu(print_timestamp, this_cpu) = touch_timestamp;
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment