From: "H. Peter Anvin" <hpa@zytor.com>
To: Andi Kleen <ak@suse.de>
Cc: Andrew Morton <akpm@linux-foundation.org>,
Rusty Russell <rusty@rustcorp.com.au>,
Matt Mackall <mpm@selenic.com>,
linux-kernel@vger.kernel.org
Subject: Re: [PATCH] lguest-fix-divide-error-implement-sched_clock
Date: Tue, 05 Jun 2007 11:43:49 -0700 [thread overview]
Message-ID: <4665AEE5.7040904@zytor.com> (raw)
In-Reply-To: <200706051837.22847.ak@suse.de>
Andi Kleen wrote:
>
> I don't think it's a good idea for the TSC. There are various
> setups where it is unreliable and also often simulators don't
> implement it correctly. And it's always a valuable workaround
> to be able to turn it off.
>
I dug some more into the TSC code, and found some other annoying stuff:
/*
* Make an educated guess if the TSC is trustworthy and synchronized
* over all CPUs.
*/
__cpuinit int unsynchronized_tsc(void)
{
if (!cpu_has_tsc || tsc_unstable)
return 1;
/*
* Intel systems are normally all synchronized.
* Exceptions must mark TSC as unstable:
*/
if (boot_cpu_data.x86_vendor != X86_VENDOR_INTEL) {
/* assume multi socket systems are not synchronized: */
if (num_possible_cpus() > 1)
tsc_unstable = 1;
}
return tsc_unstable;
}
That's a vendor check foul. That should be a CPU feature flag.
Looks like there is some work to be done here.
-hpa
next prev parent reply other threads:[~2007-06-05 18:44 UTC|newest]
Thread overview: 18+ messages / expand[flat|nested] mbox.gz Atom feed top
2007-05-22 22:38 lguest broken in 2.6.22-rc1-mm1 Matt Mackall
2007-05-22 23:27 ` Rusty Russell
2007-06-04 17:19 ` lguest rebroken in 2.6.22-rc3-mm1 Matt Mackall
2007-06-04 17:28 ` Andrew Morton
2007-06-04 17:46 ` Matt Mackall
2007-06-04 18:12 ` Andi Kleen
2007-06-05 2:48 ` Rusty Russell
2007-06-05 10:01 ` Andi Kleen
2007-06-05 13:11 ` [PATCH] lguest-fix-divide-error-implement-sched_clock Rusty Russell
2007-06-05 14:24 ` Andi Kleen
2007-06-05 16:07 ` Andrew Morton
2007-06-05 16:16 ` H. Peter Anvin
2007-06-05 16:37 ` Andi Kleen
2007-06-05 17:02 ` H. Peter Anvin
2007-06-05 18:43 ` H. Peter Anvin [this message]
2007-06-05 18:51 ` Andi Kleen
2007-06-05 21:15 ` H. Peter Anvin
2007-06-05 21:31 ` 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=4665AEE5.7040904@zytor.com \
--to=hpa@zytor.com \
--cc=ak@suse.de \
--cc=akpm@linux-foundation.org \
--cc=linux-kernel@vger.kernel.org \
--cc=mpm@selenic.com \
--cc=rusty@rustcorp.com.au \
/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