discussion forum



message

Name: Christian Ludloff
eMail: ludloff@sandpile.org
Date: October 01, 2003 at 07:19:09
Subject: Re: Question about RDTSC programming
In Reply To: Re: Question about RDTSC programming by
fcpuid on October 01, 2003 at 06:12:55
Text: | I confirm that RDTSC is very accurate.

Unfortunately the definition of the TSC is somewhat lax.

It merely specifies that the TSC value is incremented once during every
processor clock cycle, even during HLT or STPCLK, and that the value is
monotonically increasing for successive RDTSCs (errata aside). However,
it does not specify the actual clock that is used to increment the TSC.
It could be the current core clock. But it could as well be a faster or
slower clock, used for a portion of the processor. Or the nominal clock
at which the processor is rated, regardless of its current clock. Heck,
it could even be a completely arbitrary clock.

For example, the TSC value of my 866 MHz Crusoe appears to increment at
a rate of 866 million times per second, regardless of the current clock
frequency (which LongRun can vary from 300 to 866 MHz).

Another easily forgotten aspect is that while instruction timing can be
predicted, the complexity of doing so can be quite enormous.

After all, there aren't just pipelines, caches, buffers, memory, and so
on, but also implementations that are based on dynamic translation.

Just my $0.02.

--
CL

optional link: sandpile.org



post a followup message
(Be nice... or be blocked. Be technical... or be erased.)

Name: optional link title:
eMail: optional link URL:
Subject: optional image URL:
  Insert line breaks by hand when only about one inch remains at the right side. Otherwise your message will be unreadable.
Text:
 

  Note: The above eMail form fields may look unaligned if you are using a browser other than Netscape Navigator version 3.0.



currently posted followup messages
(You may have to press the RELOAD button of your browser.)




main page