Re: Microsecond accuracy

H. Peter Anvin
2000-12-07T16:04:12Z

Followup to: <Pine.LNX.4.21.0012071411170.970-100000@penguin.homenet>
By author: Tigran Aivazian <tigran@veritas.com>
In newsgroup: linux.dev.kernel
>
> while we are on this subject, please let me emphasize that you should
> _not_ be using cpuid instruction to detect the presence of TSC but should
> parse the /proc/cpuinfo file. There are many valid reasons why Linux's
> idea of TSC presence may not be the same as hardware's (cpuid
> instruction) idea.
>

Unfortunately the most important instance of the in-kernel flag -- the
global one in the somewhat misnamed boot_cpu_data.x86_features --
isn't actually readable in the /proc/cpuinfo file. It is perfectly
possible (e.g. the "notsc" option) for ALL the CPUs to report this
capability, but the global capability to still be off.

I would like to have exported the global capabilities into
/proc/cpuinfo, but I'm worried about breaking software (the "flags"
versus "features" issue was bad enough -- unfortunately, in cases like
this, there probably is no "good" solution.)

-hpa
--
<hpa@transmeta.com> at work, <hpa@zytor.com> in private!
"Unix gives you enough rope to shoot yourself in the foot."