All of lore.kernel.org
 help / color / mirror / Atom feed
From: David Fries <david@fries.net>
To: john stultz <johnstul@us.ibm.com>
Cc: Ingo Molnar <mingo@elte.hu>,
	linux-kernel <linux-kernel@vger.kernel.org>,
	Thomas Gleixner <tglx@tglx.de>
Subject: Re: TSC marked unstable on suspend and resume
Date: Thu, 30 Apr 2009 22:13:20 -0500	[thread overview]
Message-ID: <20090501031320.GA4300@spacedout.fries.net> (raw)
In-Reply-To: <1241062653.7270.44.camel@localhost.localdomain>

[-- Attachment #1: Type: text/plain, Size: 2440 bytes --]

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 <david@fries.net> 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 <johnstul@us.ibm.com>

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 <david@fries.net>
http://fries.net/~david/ (PGP encryption key available)

[-- Attachment #2: clocksource_suspend.txt.bz2 --]
[-- Type: application/octet-stream, Size: 4502 bytes --]

  reply	other threads:[~2009-05-01  3:14 UTC|newest]

Thread overview: 11+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2009-02-21  2:39 TSC marked unstable on suspend and resume David Fries
2009-02-23 23:23 ` Rafael J. Wysocki
2009-02-24  4:58   ` David Fries
2009-02-27 21:05     ` Pavel Machek
2009-04-29 16:45 ` john stultz
2009-04-29 23:25   ` David Fries
2009-04-30  3:37     ` john stultz
2009-05-01  3:13       ` David Fries [this message]
2009-05-08 21:53       ` Ondrej Zary
2009-05-09  0:34         ` David Fries
2009-05-09 10:02           ` Ondrej Zary

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20090501031320.GA4300@spacedout.fries.net \
    --to=david@fries.net \
    --cc=johnstul@us.ibm.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=mingo@elte.hu \
    --cc=tglx@tglx.de \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.