public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
From: Andi Kleen <ak@suse.de>
To: Ingo Molnar <mingo@elte.hu>
Cc: Andrew Morton <akpm@osdl.org>,
	tglx@linutronix.de, john stultz <johnstul@us.ibm.com>,
	LKML <linux-kernel@vger.kernel.org>, Len Brown <lenb@kernel.org>,
	Arjan van de Ven <arjan@infradead.org>,
	Roman Zippel <zippel@linux-m68k.org>
Subject: Re: [patch 13/19] GTOD: Mark TSC unusable for highres timers
Date: Fri, 10 Nov 2006 10:27:43 +0100	[thread overview]
Message-ID: <200611101027.43744.ak@suse.de> (raw)
In-Reply-To: <20061110085728.GA14620@elte.hu>

On Friday 10 November 2006 09:57, Ingo Molnar wrote:
> 
> * Andrew Morton <akpm@osdl.org> wrote:
> 
> > If so, could that function use the PIT/pmtimer/etc for working out if 
> > the TSC is bust, rather than directly using jiffies?
> 
> there's no realiable way to figure out the TSC is bust: some CPUs have a 
> slight 'skew' between cores for example. 

We find this out by black listing them. I got that working reliably as far as I know.

The main cases I know where we can't use it right now is:
- AMD >1 core
* when clock ramping is disabled it gets a little better, but on multi socket
it is still broken
* also it varies in frequency here which has to be handled
+ There is a little issue here that the frequency takes some unpredictible 
time to stabilize after the frequency change. AFAIK the error is too small
to cause problems though.
- Some Intel NUMA systems (IBM x4xx, Unisys ES7000, ScaleMP) 
* handled by detecting multiple Apic Clusters
- Intel systems with C3
* stops in C3. disable here
- a few P4 dual cores seem to lose TSC synchronization when overclocked
(or most likely overvolted) and running out of Spec
* I chose to ignore this case. User fault. They can set command line options.
- We had one Intel BIOS which misprogrammed the FSB dividers
* Got fixed by BIOS update. Also it was a obscure case that can be handled
with command line options.

I don't see how this is changing much with dyntimers. The only
difference that should be there is that you require TSC stability for
a longer time (instead of only HZ), but normally when the TSC is instable
it already causes trouble in the current setup.

You're probably overreacting to something. Maybe one of the old bugs?
(I had a typo in the Intel C3 detection for a long time that broke
a lot of Intel laptops) 

> On some systems the TSC might  
> skew between sockets. A CPU might break its TSC only once some 
> powersaving mode has been activated - which might be long after bootup. 
> The whole TSC business is a nightmare and cannot be supported reliably.

I disagree. 

> AFAIK Windows doesnt use it, so it's a continuous minefield for new 
> hardware to break.

Not true.
 
> We should wait until CPU makers get their act together and implement a 
> TSC variant that is /architecturally promised/ to have constant 
> frequency (system bus frequency or whatever) 

Intel already has that (modulo totally broken BIOS and overclocking). 
TSC is running always at highest P-state and usually synchronized too.

AMD is getting there.

> and which never stops. 

That's unrealistic unfortunately any time soon.  All the CPU vendors
are pushing for much more aggressive power saving and this basically 
means turning off the CPU completely in the deeper sleep states.

-Andi

 

  parent reply	other threads:[~2006-11-10  9:28 UTC|newest]

Thread overview: 70+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2006-11-09 23:38 [patch 00/21] Highres / dynticks drop in replacement for 2.6.19-rc5-mm1 Thomas Gleixner
2006-11-09 23:38 ` [patch 01/19] hrtimers: state tracking Thomas Gleixner
2006-11-10  9:19   ` Arjan van de Ven
2006-11-10  9:40     ` Andrew Morton
2006-11-10  9:45       ` Thomas Gleixner
2006-11-23 22:26   ` Roman Zippel
2006-11-09 23:38 ` [patch 02/19] hrtimers: clean up callback tracking Thomas Gleixner
2006-11-10  9:20   ` Arjan van de Ven
2006-11-09 23:38 ` [patch 03/19] hrtimers: Move and add documentation Thomas Gleixner
2006-11-09 23:38 ` [patch 04/19] Add a framework to manage clock event devices Thomas Gleixner
2006-11-10  9:47   ` Arjan van de Ven
2006-11-23 22:36   ` Roman Zippel
2006-11-09 23:38 ` [patch 05/19] ACPI: Include apic.h Thomas Gleixner
2006-11-09 23:38 ` [patch 06/19] ACPI: Keep track of timer broadcast Thomas Gleixner
2006-11-10  9:51   ` Arjan van de Ven
2006-11-09 23:38 ` [patch 07/19] ACPI: Add state propagation for dynamic broadcasting Thomas Gleixner
2006-11-10  9:52   ` Arjan van de Ven
2006-11-09 23:38 ` [patch 08/19] i386: cleanup apic code Thomas Gleixner
2006-11-10 10:04   ` Arjan van de Ven
2006-11-10 10:16     ` Thomas Gleixner
2006-11-10 10:16       ` Arjan van de Ven
2006-11-09 23:38 ` [patch 09/19] i386: Convert to clock event devices Thomas Gleixner
2006-11-10 10:10   ` Arjan van de Ven
2006-11-09 23:38 ` [patch 10/19] PM_timer: allow early access and move externs to a header file Thomas Gleixner
2006-11-10 10:12   ` Arjan van de Ven
2006-11-09 23:38 ` [patch 11/19] i386: Rework local APIC calibration Thomas Gleixner
2006-11-10 10:17   ` Arjan van de Ven
2006-11-10 10:23     ` Thomas Gleixner
2006-11-10 11:10     ` Ingo Molnar
2006-11-09 23:38 ` [patch 12/19] high-res timers: core Thomas Gleixner
2006-11-10 10:26   ` Arjan van de Ven
2006-11-09 23:38 ` [patch 13/19] GTOD: Mark TSC unusable for highres timers Thomas Gleixner
2006-11-10  1:10   ` john stultz
2006-11-10  5:10     ` Andi Kleen
2006-11-10  8:10       ` Thomas Gleixner
2006-11-10  8:50         ` Andrew Morton
2006-11-10  8:57           ` Ingo Molnar
2006-11-10  9:13             ` Andrew Morton
2006-11-10  9:29               ` Andi Kleen
2006-11-11 11:14                 ` Thomas Gleixner
2006-11-11 13:51                   ` Andi Kleen
2006-11-11 13:58                     ` Thomas Gleixner
2006-11-11 13:59                       ` Andi Kleen
2006-11-11 14:08                         ` Thomas Gleixner
2006-11-10 10:35               ` Arjan van de Ven
2006-11-10 10:47                 ` Andi Kleen
2006-11-10 10:55                   ` Arjan van de Ven
2006-11-10 11:13                     ` Ingo Molnar
2006-11-10 11:28                     ` Andi Kleen
2006-11-10  9:27             ` Andi Kleen [this message]
2006-11-10 10:14             ` Alan Cox
2006-11-10 11:19               ` Ingo Molnar
2006-11-10 15:43               ` Chris Friesen
2006-11-10 11:12             ` Pavel Machek
2006-11-10 11:48               ` Ingo Molnar
2006-11-10 11:56                 ` Andi Kleen
2006-11-10 13:12                   ` Ingo Molnar
2006-11-10 12:00                 ` Pavel Machek
2006-11-10 13:14                   ` Ingo Molnar
2006-11-10 11:11         ` Pavel Machek
2006-11-10 10:28       ` Arjan van de Ven
2006-11-10 10:30         ` Andi Kleen
2006-11-10 10:37           ` Arjan van de Ven
2006-11-09 23:38 ` [patch 14/19] dynticks: core code Thomas Gleixner
2006-11-09 23:38 ` [patch 15/19] dyntick: add nohz stats to /proc/stat Thomas Gleixner
2006-11-09 23:38 ` [patch 16/19] dynticks: i386 arch code Thomas Gleixner
2006-11-09 23:38 ` [patch 17/19] dynticks: Fix nmi watchdog Thomas Gleixner
2006-11-09 23:38 ` [patch 18/19] high-res timers, dynticks: enable i386 support Thomas Gleixner
2006-11-09 23:38 ` [patch 19/19] debugging feature: timer stats Thomas Gleixner
2006-11-23 22:24 ` [patch 00/21] Highres / dynticks drop in replacement for 2.6.19-rc5-mm1 Roman Zippel

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=200611101027.43744.ak@suse.de \
    --to=ak@suse.de \
    --cc=akpm@osdl.org \
    --cc=arjan@infradead.org \
    --cc=johnstul@us.ibm.com \
    --cc=lenb@kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=mingo@elte.hu \
    --cc=tglx@linutronix.de \
    --cc=zippel@linux-m68k.org \
    /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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox