Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1764156AbZEADOO (ORCPT ); Thu, 30 Apr 2009 23:14:14 -0400 Received: (majordomo@vger.kernel.org) by vger.kernel.org id S1760372AbZEADN4 (ORCPT ); Thu, 30 Apr 2009 23:13:56 -0400 Received: from SpacedOut.fries.net ([67.64.210.234]:49974 "EHLO SpacedOut.fries.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1759115AbZEADN4 (ORCPT ); Thu, 30 Apr 2009 23:13:56 -0400 Date: Thu, 30 Apr 2009 22:13:20 -0500 From: David Fries To: john stultz Cc: Ingo Molnar , linux-kernel , Thomas Gleixner Subject: Re: TSC marked unstable on suspend and resume Message-ID: <20090501031320.GA4300@spacedout.fries.net> References: <20090221023943.GA4894@spacedout.fries.net> <1f1b08da0904290945j79e1b578ye415fe4ced259b15@mail.gmail.com> <20090429232523.GO2862@spacedout.fries.net> <1241062653.7270.44.camel@localhost.localdomain> MIME-Version: 1.0 Content-Type: multipart/mixed; boundary="WIyZ46R2i8wDzkSu" Content-Disposition: inline In-Reply-To: <1241062653.7270.44.camel@localhost.localdomain> User-Agent: Mutt/1.5.18 (2008-05-17) X-Greylist: Sender is SPF-compliant, not delayed by milter-greylist-3.0 (SpacedOut.fries.net [127.0.0.1]); Thu, 30 Apr 2009 22:13:24 -0500 (CDT) Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 9053 Lines: 160 --WIyZ46R2i8wDzkSu Content-Type: text/plain; charset=us-ascii Content-Disposition: inline On Wed, Apr 29, 2009 at 08:37:33PM -0700, john stultz wrote: > On Wed, 2009-04-29 at 18:25 -0500, David Fries wrote: > > On Wed, Apr 29, 2009 at 09:45:40AM -0700, john stultz wrote: > > > On Fri, Feb 20, 2009 at 7:39 PM, David Fries wrote: > > > > I'm getting TSC marked as unsable on hibernate to disk with > > > > 2.6.29-rc3. ?The last kernel I ran 2.6.24.4 ran 300+ days without a > > > > problem and does not loose TSC on hibernate. > > > > > > > > I'm hibernating with `echo disk > /sys/power/state`. > > > > These look like the relavant messages, > > > > > > > > CPU 0 irqstacks, hard=c0379000 soft=c0378000 > > > > PID hash table entries: 1024 (order: 10, 4096 bytes) > > > > Fast TSC calibration using PIT > > > > Detected 300.705 MHz processor. > > > > Calibrating delay loop (skipped), value calculated using timer frequency.. 601.41 BogoMIPS (lpj=300705) > > > > hibernate to disk, > > > > Restarting tasks ... done. > > > > Clocksource tsc unstable (delta = 499883531 ns) > > > > > > Hmm. Seems like the clocksource watchdog is having some problem > > > handling state around hibernate. > > Yea. This seems to be the case here. There's watchdog code and variables > to handle resume properly, but there isn't a corresponding suspend hook, > so the resume path doesn't actually change anything. > > Here's a patch you can try, I only had time to compile test it today, so > its untested. Hopefully I didn't miss anything obvious. > > Thomas, I suspect you intended to have something like the following? > > Signed-off-by: John Stultz I added my own patch to verify your changes were being called, no dice. I do wonder, is it too late when the clocksource_suspend is called after Suspending consoles? Any theories why this is the only system I have that is showing the problem? It is an older system. In the attached dmesg dump I suspended without a swap file, so it never hibernated or rebooted. diff --git a/kernel/time/clocksource.c b/kernel/time/clocksource.c index 7575f23..387fed4 100644 --- a/kernel/time/clocksource.c +++ b/kernel/time/clocksource.c @@ -261,6 +261,7 @@ void clocksource_suspend(void) spin_lock_irqsave(&clocksource_lock, flags); clocksource_suspend_watchdog(); spin_unlock_irqrestore(&clocksource_lock, flags); + printk("Calling %s\n", __func__); } /** -- David Fries http://fries.net/~david/ (PGP encryption key available) --WIyZ46R2i8wDzkSu Content-Type: application/octet-stream Content-Disposition: attachment; filename="clocksource_suspend.txt.bz2" Content-Transfer-Encoding: base64 QlpoOTFBWSZTWWqHcYgAChzfgH/0W+///3/v//q////wYBM83Pjy9zjr0RJ7bt3dVs1jt1Kn p7po1sle7e9nRRpydJ2auzu2mRVBQK2wAaCmIBMRMZJ5R6mmU2k9NNATTRkaZGhoGg0DTQSi BMIaRoTBJ6AnogZRo0yNG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BpkhG4kr5AX y3C0ckLa8qw16NmCCWhfx90N7ybHSu9kbwwggMqsmLeOg7l1TFhyBBgSZQ2y5RzUhTShVrSj puiXQM3JM20DBvCGBylKXvvgNuxDqlEsidKRGrlYA1EMsXunEoWTJyCnOMRqD7NMhs7aOGAr aoCq7bCHAZCsnomF7g1hVZouAwJQo3KKFUKQ3ZWSFMLntSPdYsTG5l1swtmqyZgzrUEIxbTG y3jmWoMAIRr0tRTFBIai9ScXL9sBLzAgszRmiRw5ypfaa+Q+N3s0KW60u4OPQenKizEYQnJp wxUh9cIKRBcPIDwZ0lxOIM3qZgem64LWM+vIC46Vd5BWhvnxUMJNjIBVhKg1QH3qaVaUnMr9 t1Co2mBmdBrkEwY2daxxA7G/uEI4uc4SEEZkqratN6N0ugmqxxRKVSKFJxKjBhS2nBzXpOvc hXpHttzQzYl/+LuSKcKEg1Q7jEA= --WIyZ46R2i8wDzkSu-- -- To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/