Usenet.com

www.Usenet.com

Group Index

Comp Thread Archive from Usenet.com

<-- __Chronological__ --> <-- __Thread__ -->

Re: Call-gate-like mechanism



> Whatever the way you know which processor you run on (CPUID? how?), there
> is a race condition possible between the process inquiring about its
> processor id, reading the correction value from some place, and finally
> calling RDTSC: a schedule in between can push the process onto a different
> CPU, giving a correction value / RDTSC readout mismatch.
>
> As far as I can see, the only sane fix would be an RDTSC that returned
> not only the cycle count, but also a processor ID.
>
> "Glen Herrmannsfeldt" <[EMAIL PROTECTED]> writes:

On AMD processors the entire TSC can be written.
So, you can write the CPU number into each TSC.
The act of writing may be done at an indeterminate
time, so you would then have to re-measure the skew
between CPUs.

I think that the entire TSC cannot be written on
Intel Pentium 4. Only the low 32 bits.

IIRC the TSC can be written on P6 family CPUs.





<-- __Chronological__ --> <-- __Thread__ -->


Usenet.com



Please check out one of the premium Usenet Newsgroup Service Providers below for access to Usenet.