Skip to content

Commit

Permalink
fix the softlockup watchdog to actually work
Browse files Browse the repository at this point in the history
this Xen related commit:

   commit 966812d
   Author: Jeremy Fitzhardinge <[email protected]>
   Date:   Tue May 8 00:28:02 2007 -0700

       Ignore stolen time in the softlockup watchdog

broke the softlockup watchdog to never report any lockups. (!)

print_timestamp defaults to 0, this makes the following condition
always true:

	if (print_timestamp < (touch_timestamp + 1) ||

and we'll in essence never report soft lockups.

apparently the functionality of the soft lockup watchdog was never
actually tested with that patch applied ...

Signed-off-by: Ingo Molnar <[email protected]>
Cc: Jeremy Fitzhardinge <[email protected]>
Cc: <[email protected]>
Signed-off-by: Andrew Morton <[email protected]>
Signed-off-by: Linus Torvalds <[email protected]>
  • Loading branch information
Ingo Molnar authored and Linus Torvalds committed Oct 17, 2007
1 parent a3b13c2 commit a115d5c
Showing 1 changed file with 4 additions and 3 deletions.
7 changes: 4 additions & 3 deletions kernel/softlockup.c
Original file line number Diff line number Diff line change
Expand Up @@ -82,10 +82,11 @@ void softlockup_tick(void)
print_timestamp = per_cpu(print_timestamp, this_cpu);

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

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

0 comments on commit a115d5c

Please sign in to comment.