[PATCH] Improve clocksource unstable warning

Previous message: [thread] [date] [author]
Next message: [thread] [date] [author]
From: Andy Lutomirski
Date: Wednesday, November 10, 2010 - 3:16 pm

When the system goes out to lunch for a long time, the clocksource
watchdog might get false positives.  Clarify the warning so that
people stop blaming their system freezes on the timing code.

This change was Thomas Gleixner's suggestion.

Signed-off-by: Andy Lutomirski <luto@mit.edu>
---
I've only compile-tested on 2.6.36, but it applies cleanly to Linus' tree
and it's rather trivial.

 kernel/time/clocksource.c |    6 ++++--
 1 files changed, 4 insertions(+), 2 deletions(-)

diff --git a/kernel/time/clocksource.c b/kernel/time/clocksource.c
index c18d7ef..5b30aa2 100644
--- a/kernel/time/clocksource.c
+++ b/kernel/time/clocksource.c
@@ -215,8 +215,10 @@ static void __clocksource_unstable(struct clocksource *cs)
 
 static void clocksource_unstable(struct clocksource *cs, int64_t delta)
 {
-	printk(KERN_WARNING "Clocksource %s unstable (delta = %Ld ns)\n",
-	       cs->name, delta);
+	printk(KERN_WARNING "Clocksource %s unstable (delta = %Ld ns)%s\n",
+	       cs->name, delta,
+	       delta < -5000000000LL ?
+		 " or your system lagged for other reasons" : "");
 	__clocksource_unstable(cs);
 }
 
-- 
1.7.3.2

--
Previous message: [thread] [date] [author]
Next message: [thread] [date] [author]

Messages in current thread:
[PATCH] Improve clocksource unstable warning, Andy Lutomirski, (Wed Nov 10, 3:16 pm)
Re: [PATCH] Improve clocksource unstable warning, Thomas Gleixner, (Wed Nov 10, 3:28 pm)
[PATCH v2] Improve clocksource unstable warning, Andy Lutomirski, (Wed Nov 10, 3:42 pm)
Re: [PATCH] Improve clocksource unstable warning, john stultz, (Fri Nov 12, 2:31 pm)
Re: [PATCH] Improve clocksource unstable warning, john stultz, (Fri Nov 12, 2:51 pm)
Re: [PATCH] Improve clocksource unstable warning, Andrew Lutomirski, (Fri Nov 12, 2:52 pm)
Re: [PATCH] Improve clocksource unstable warning, john stultz, (Fri Nov 12, 4:40 pm)
Re: [PATCH] Improve clocksource unstable warning, Andrew Lutomirski, (Fri Nov 12, 4:48 pm)
Re: [PATCH] Improve clocksource unstable warning, Andrew Lutomirski, (Fri Nov 12, 4:51 pm)
Re: [PATCH] Improve clocksource unstable warning, john stultz, (Fri Nov 12, 4:52 pm)
Re: [PATCH] Improve clocksource unstable warning, john stultz, (Fri Nov 12, 5:22 pm)
Re: [PATCH] Improve clocksource unstable warning, john stultz, (Fri Nov 12, 5:58 pm)
Re: [PATCH] Improve clocksource unstable warning, Andrew Lutomirski, (Tue Nov 16, 5:05 pm)
Re: [PATCH] Improve clocksource unstable warning, john stultz, (Tue Nov 16, 5:26 pm)
Re: [PATCH] Improve clocksource unstable warning, Andrew Lutomirski, (Tue Nov 16, 5:54 pm)
Re: [PATCH] Improve clocksource unstable warning, john stultz, (Tue Nov 16, 6:19 pm)
Re: [PATCH] Improve clocksource unstable warning, Andrew Lutomirski, (Tue Nov 16, 6:24 pm)
Re: [PATCH] Improve clocksource unstable warning, john stultz, (Tue Nov 16, 6:54 pm)