[lkml]   [2000]   [Nov]   [17]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
Messages in this thread
SubjectRe: Error in x86 CPU capabilities starting with test5/6
> > You have a user-space program which parses /proc/cpuinfo instead of
> > executing CPUID itself, so it breaks.
> Arguably, it is always better to parse /proc/cpuinfo instead of executing

Actually this is definitively the case.

It is not safe to use cpuid to check the availability of RDTSC in Linux because
the CPU itself does not know if the TSC is buggy (Some MediaGX, some WinChip,..)
or if the TSC on an SMP box is constant across all processors.

Even checking the cpuinfo for the TSC should be done with care, and its far
far better to use gettimeofday unless doing very tiny timings (eg for
optimising code paths)


To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to
Please read the FAQ at

 \ /
  Last update: 2005-03-22 12:47    [W:0.070 / U:3.752 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site