From: john stultz <johnstul@us.ibm.com>
To: Andi Kleen <ak@muc.de>
Cc: Matthias Urlichs <smurf@smurf.noris.de>,
Andrew Morton <akpm@osdl.org>,
linux-kernel@vger.kernel.org, torvalds@osdl.org, bunk@stusta.de,
lethal@linux-sh.org, hirofumi@mail.parknet.co.jp,
asit.k.mallick@intel.com
Subject: Re: REGRESSION: the new i386 timer code fails to sync CPUs
Date: Mon, 24 Jul 2006 13:54:03 -0700 [thread overview]
Message-ID: <1153774443.12836.6.camel@localhost> (raw)
In-Reply-To: <20060724175150.GD50320@muc.de>
On Mon, 2006-07-24 at 19:51 +0200, Andi Kleen wrote:
> On Mon, Jul 24, 2006 at 07:17:11PM +0200, Matthias Urlichs wrote:
> > You can probably assume that they're synced on systems with no more
> > than one dual-core / hyperthreaded CPU.
> >
> > My system obviously has two of those.
>
> According to Intel on all of their chipsets/motherboard reference
> designs all the sockets run from a single clock crystal.
>
> I've confirmed this for a long time on 64bit and even to some
> extent on 32bit on distro kernels.
Andi: Which 32bit distro patch are you referring to here?
> Maybe you got a broken BIOS or similar though.
>
> > > Matthias: "clock=pmtmr" is probably the best workaround in the short
> > > term. Could you send me your dmesg and dmidecode output? We'll try to
> > > find something to key off of so it will mark the tsc as unstable by
> > > default on your system.
> > >
> > I'd assume that finding (and, possibly, being unable to correct) TSC skew
>
> The BIOS normally guarantee it at boot. However maybe you got a broken one.
>
> We used to do TSC sync correction at boot on Intel, but stopped doing
> that when we found out that the TSC sync code adds an error
> To an already perfectly synchronized system.
>
> Actually I think i386 still does it, just x86-64 stopped
Indeed i386 still does it. I knew x86-64 had a new ia64 inspired
algorithm, but I didn't realize that they didn't even try to call it in
most cases.
The (untested) patch below will disable it on i386. Matthias, mind
trying it out to see if the TSC sync code is causing the problem?
> My first assumption would be that you hit a bug somewhere in the new
> clock code. What happens when you boot an older kernel (like 2.6.17)
> with clock=tsc ?
Yes, that would be good to confirm the issue. :)
thanks
-john
Hack out the i386 TSC sync code.
diff --git a/arch/i386/kernel/smpboot.c b/arch/i386/kernel/smpboot.c
index 6f5fea0..cd28914 100644
--- a/arch/i386/kernel/smpboot.c
+++ b/arch/i386/kernel/smpboot.c
@@ -435,7 +435,7 @@ static void __devinit smp_callin(void)
/*
* Synchronize the TSC with the BP
*/
- if (cpu_has_tsc && cpu_khz && !tsc_sync_disabled)
+ if (0 && cpu_has_tsc && cpu_khz && !tsc_sync_disabled)
synchronize_tsc_ap();
}
@@ -1305,7 +1305,7 @@ static void __init smp_boot_cpus(unsigne
/*
* Synchronize the TSC with the AP
*/
- if (cpu_has_tsc && cpucount && cpu_khz)
+ if (0 && cpu_has_tsc && cpucount && cpu_khz)
synchronize_tsc_bp();
}
next prev parent reply other threads:[~2006-07-24 20:54 UTC|newest]
Thread overview: 25+ messages / expand[flat|nested] mbox.gz Atom feed top
2006-07-22 23:36 REGRESSION: the new i386 timer code fails to sync CPUs Matthias Urlichs
2006-07-23 0:36 ` Andrew Morton
2006-07-23 8:16 ` Matthias Urlichs
2006-07-23 11:46 ` Andrew Morton
2006-07-23 12:08 ` Matthias Urlichs
2006-07-23 12:37 ` Andrew Morton
2006-07-23 12:58 ` Matthias Urlichs
2006-07-24 15:52 ` Siddha, Suresh B
2006-07-24 15:58 ` john stultz
2006-07-24 17:17 ` Matthias Urlichs
2006-07-24 17:51 ` Andi Kleen
2006-07-24 20:54 ` john stultz [this message]
2006-07-30 9:03 ` Andrew Morton
2006-07-30 9:49 ` Matthias Urlichs
2006-07-30 20:10 ` Andi Kleen
2006-07-30 20:55 ` Andrew Morton
2006-07-30 21:13 ` Matthias Urlichs
2006-07-30 21:20 ` Arjan van de Ven
2006-07-30 21:55 ` Matthias Urlichs
2006-08-01 1:47 ` Siddha, Suresh B
2006-08-01 3:14 ` Matthias Urlichs
2006-07-30 21:57 ` Andi Kleen
2006-07-30 22:28 ` Matthias Urlichs
2006-07-31 14:24 ` Matthias Urlichs
2006-07-24 17:39 ` Andi Kleen
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=1153774443.12836.6.camel@localhost \
--to=johnstul@us.ibm.com \
--cc=ak@muc.de \
--cc=akpm@osdl.org \
--cc=asit.k.mallick@intel.com \
--cc=bunk@stusta.de \
--cc=hirofumi@mail.parknet.co.jp \
--cc=lethal@linux-sh.org \
--cc=linux-kernel@vger.kernel.org \
--cc=smurf@smurf.noris.de \
--cc=torvalds@osdl.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