[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <20070719075152.GB12760@elte.hu>
Date: Thu, 19 Jul 2007 09:51:53 +0200
From: Ingo Molnar <mingo@...e.hu>
To: Andrew Morton <akpm@...ux-foundation.org>
Cc: Jeremy Fitzhardinge <jeremy@...p.org>,
linux-kernel@...r.kernel.org,
Linus Torvalds <torvalds@...ux-foundation.org>,
stable@...nel.org, Greg KH <greg@...ah.com>,
Chris Wright <chrisw@...s-sol.org>
Subject: Re: [patch] fix the softlockup watchdog to actually work
* Andrew Morton <akpm@...ux-foundation.org> wrote:
> But I'll sit on this patch for a while until this gets sorted out.
> Meanwhile, please double-check the elapsed-time arithmetic in there,
> maybe do a bit of runtime testing?
btw., could you apply the patch below as well? Maybe sched_clock() is
misbehaving on your box? (with this i have 5 softlockup patches in my
tree - and they are working fine so far.)
Ingo
---------------->
Subject: [patch] softlockup: use a reliable global time source
From: Ingo Molnar <mingo@...e.hu>
using sched_clock() for the soft-lockups was a bad idea, sched_clock()
is not a reliable global time-source.
Signed-off-by: Ingo Molnar <mingo@...e.hu>
---
kernel/softlockup.c | 6 ++----
1 file changed, 2 insertions(+), 4 deletions(-)
Index: linux/kernel/softlockup.c
===================================================================
--- linux.orig/kernel/softlockup.c
+++ linux/kernel/softlockup.c
@@ -37,13 +37,11 @@ static struct notifier_block panic_block
};
/*
- * Returns seconds, approximately. We don't need nanosecond
- * resolution, and we don't need to waste time with a big divide when
- * 2^30ns == 1.074s.
+ * Returns seconds.
*/
static unsigned long get_timestamp(void)
{
- return sched_clock() >> 30; /* 2^30 ~= 10^9 */
+ return jiffies / HZ;
}
void touch_softlockup_watchdog(void)
-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/
Powered by blists - more mailing lists