Commit 3e2f69fd authored by Johannes Weiner's avatar Johannes Weiner Committed by Ingo Molnar

softlockup: fix watchdog task wakeup frequency

The print_timestamp can never be bigger than the touch_timestamp, at
maximum it can be equal.  And if it is, the second check for
touch_timestamp + 1 bigger print_timestamp is always true, too.

The check for equality is sufficient as we proceed in one-second-steps
and are at least one second away from the last print-out if we have
another timestamp.
Signed-off-by: default avatarJohannes Weiner <hannes@saeurebad.de>
Cc: Peter Zijlstra <a.p.zijlstra@chello.nl>
Signed-off-by: default avatarIngo Molnar <mingo@elte.hu>
parent dd7a1e56
...@@ -116,11 +116,8 @@ void softlockup_tick(void) ...@@ -116,11 +116,8 @@ void softlockup_tick(void)
print_timestamp = per_cpu(print_timestamp, this_cpu); print_timestamp = per_cpu(print_timestamp, this_cpu);
/* report at most once a second */ /* report at most once a second */
if ((print_timestamp >= touch_timestamp && if (print_timestamp == touch_timestamp || did_panic)
print_timestamp < (touch_timestamp + 1)) ||
did_panic) {
return; return;
}
/* do not print during early bootup: */ /* do not print during early bootup: */
if (unlikely(system_state != SYSTEM_RUNNING)) { if (unlikely(system_state != SYSTEM_RUNNING)) {
......
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