Skip to content

Commit

Permalink
softlockup: fix watchdog task wakeup frequency
Browse files Browse the repository at this point in the history
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: Johannes Weiner <hannes@saeurebad.de>
Cc: Peter Zijlstra <a.p.zijlstra@chello.nl>
Signed-off-by: Ingo Molnar <mingo@elte.hu>
  • Loading branch information
Johannes Weiner authored and Ingo Molnar committed Jul 1, 2008
1 parent dd7a1e5 commit 3e2f69f
Showing 1 changed file with 1 addition and 4 deletions.
5 changes: 1 addition & 4 deletions kernel/softlockup.c
Original file line number Diff line number Diff line change
Expand Up @@ -116,11 +116,8 @@ void softlockup_tick(void)
print_timestamp = per_cpu(print_timestamp, this_cpu);

/* report at most once a second */
if ((print_timestamp >= touch_timestamp &&
print_timestamp < (touch_timestamp + 1)) ||
did_panic) {
if (print_timestamp == touch_timestamp || did_panic)
return;
}

/* do not print during early bootup: */
if (unlikely(system_state != SYSTEM_RUNNING)) {
Expand Down

0 comments on commit 3e2f69f

Please sign in to comment.