Skip to content

Commit

Permalink
softlockup: fix watchdog task wakeup frequency
Browse files Browse the repository at this point in the history
Updating the timestamp more often is pointless as we print the warnings
only if we exceed the threshold.  And the check for hung tasks relies on
the last timestamp, so it will keep working correctly, too.

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 Jun 30, 2008
1 parent 8d5be7f commit dd7a1e5
Showing 1 changed file with 5 additions and 2 deletions.
7 changes: 5 additions & 2 deletions kernel/softlockup.c
Original file line number Diff line number Diff line change
Expand Up @@ -130,8 +130,11 @@ void softlockup_tick(void)

now = get_timestamp(this_cpu);

/* Wake up the high-prio watchdog task every second: */
if (now > (touch_timestamp + 1))
/*
* Wake up the high-prio watchdog task twice per
* threshold timespan.
*/
if (now > touch_timestamp + softlockup_thresh/2)
wake_up_process(per_cpu(watchdog_task, this_cpu));

/* Warn about unreasonable delays: */
Expand Down

0 comments on commit dd7a1e5

Please sign in to comment.