All of lore.kernel.org
 help / color / mirror / Atom feed
From: Andreas Herrmann <andreas.herrmann3@amd.com>
To: Valdis.Kletnieks@vt.edu
Cc: Thomas Gleixner <tglx@linutronix.de>, Ingo Molnar <mingo@elte.hu>,
	linux-kernel@vger.kernel.org
Subject: Re: [PATCH] x86: c1e_idle: don't mark TSC unstable if CPU has invariant TSC
Date: Fri, 19 Sep 2008 19:20:19 +0200	[thread overview]
Message-ID: <20080919172019.GA16896@alberich.amd.com> (raw)
In-Reply-To: <27087.1221766532@turing-police.cc.vt.edu>

On Thu, Sep 18, 2008 at 03:35:32PM -0400, Valdis.Kletnieks@vt.edu wrote:
> On Thu, 18 Sep 2008 21:12:10 +0200, Andreas Herrmann said:
> > .. otherwise TSC is marked unstable on AMD family 0x10 and 0x11 CPUs.
> 
> OK.  I'll bite (admittedly not having looked at the actual code yet).
> 
> If the TSC is in fact invariant, what's causing the kernel to mark it as
> unstable?

Guess, you should have a look at the code.

TSC on K8 is not P-state and C-state invariant.
Thus on K8 you'll have a TSC drift if C1E is entered.

This means that if C1E is enabled TSC should be marked unstable on
those CPUs (it shouldn't be used as a clocksource).

> Sounds almost like a bug being papered over here...

Not sure what you mean.

Currently the kernel assumes TSC is stable and there are various
places where Linux might spot when TSC is unstable. c1e_idle is one
such place. But it's wrong to mark TSC unstable for all AMD CPUs in
this function as newer CPU families have TSC's that are P- and C-state
invariant.


Regards,

Andreas



  reply	other threads:[~2008-09-19 17:21 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2008-09-18 19:12 [PATCH] x86: c1e_idle: don't mark TSC unstable if CPU has invariant TSC Andreas Herrmann
2008-09-18 19:35 ` Valdis.Kletnieks
2008-09-19 17:20   ` Andreas Herrmann [this message]
2008-09-19 18:21     ` Thomas Gleixner
2008-09-20  6:14     ` Ingo Molnar
2008-09-23  5:42       ` Andreas Herrmann

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=20080919172019.GA16896@alberich.amd.com \
    --to=andreas.herrmann3@amd.com \
    --cc=Valdis.Kletnieks@vt.edu \
    --cc=linux-kernel@vger.kernel.org \
    --cc=mingo@elte.hu \
    --cc=tglx@linutronix.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.