Port-amd64 archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

Re: rdtscp instruction

On Mon, Jul 26, 2010 at 11:46:02AM +0200, Christoph Egger wrote:
> When we fill in the cpu id in MSR_TSC_AUX then userland
> can detect and deal with TSC clock skews between different
> physical cpus.

Unlikely since there can be a process switch between the msr read
and tsc read, and the 2nd can run on a different cpu.

One thought I've had is that if the TSC are guaranteed to count
at the same rate, then the values on the different cpu can be set
significantly out of phase (ie initialise with the same value, but
with the cpu number in the high bits).
That way you can know from the value read which cpu it must have
come from.


David Laight: david%l8s.co.uk@localhost

Home | Main Index | Thread Index | Old Index