using the pentium cycle counter on MP's

Paul Barton-Davis (pbd@Op.Net)
Sat, 9 Jan 1999 02:00:46 -0500


is the cycle counter on any one processor guaranteed to be within a
certain distance of the value on all the other processors, or does a
restart leave them pretty much randomly staggered by a few
microseconds or more ?

i'm worried about a thread that uses rdtsc in user space migrating
from cpu to cpu, and getting very different values from each counter.
i looked at the intel docs that i could track down on the web, but
couldn't find an answer to this. i don't understand the kernel
code that plays with this stuff.

does linux do anything to prevent the use of the cycle counters from
being used as extremely accurate real time clocks (i'm thinking of the
idle stuff - does this in anyway stop the cycle counter from
advancing ?)

--p

-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.rutgers.edu
Please read the FAQ at http://www.tux.org/lkml/