Re: System hangs on running kernbench

!MAILaRCHIVE_VOTE_RePLACE
Previous message: [thread] [date] [author]
Next message: [thread] [date] [author]
To: Dhaval Giani <dhaval@...>
Cc: Andrew Morton <akpm@...>, Balbir Singh <balbir@...>, Srivatsa Vaddagiri <vatsa@...>, <linux-kernel@...>
Date: Wednesday, July 18, 2007 - 11:08 am

On 07/18/2007 05:41 AM, Dhaval Giani wrote:

Softlockup is broken in 2.6.22.

=======================================================================

Subject: fix the softlockup watchdog to actually work
From: Ingo Molnar <mingo@elte.hu>

this Xen related commit:

   commit 966812dc98e6a7fcdf759cbfa0efab77500a8868
   Author: Jeremy Fitzhardinge <jeremy@goop.org>
   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 ...

[this is -stable material too.]

Signed-off-by: Ingo Molnar <mingo@elte.hu>
---
 kernel/softlockup.c |    7 ++++---
 1 file changed, 4 insertions(+), 3 deletions(-)

Index: linux/kernel/softlockup.c
===================================================================
--- linux.orig/kernel/softlockup.c
+++ linux/kernel/softlockup.c
@@ -79,10 +79,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)) {
-
Previous message: [thread] [date] [author]
Next message: [thread] [date] [author]

Messages in current thread:
System hangs on running kernbench, Dhaval Giani, (Wed Jul 18, 3:56 am)
Re: System hangs on running kernbench, Srivatsa Vaddagiri, (Tue Jul 24, 3:13 am)
Re: System hangs on running kernbench, Ingo Molnar, (Tue Jul 24, 4:19 am)
Re: System hangs on running kernbench, Andrew Morton, (Wed Jul 18, 4:07 am)
Re: System hangs on running kernbench, Dhaval Giani, (Wed Jul 18, 5:41 am)
Re: System hangs on running kernbench, Chuck Ebbert, (Wed Jul 18, 11:08 am)
Re: System hangs on running kernbench, Dhaval Giani, (Thu Jul 19, 12:47 am)
Re: System hangs on running kernbench, Dhaval Giani, (Wed Jul 18, 10:46 am)
Re: System hangs on running kernbench, Dhaval Giani, (Thu Jul 19, 2:28 am)
Re: System hangs on running kernbench, Dhaval Giani, (Thu Jul 19, 2:34 am)