Re: AMD X2 unsynced TSC fix?

Andi Kleen
2006-10-28T01:05:23Z

> Wrong, too. We have a patch that will be coming SOON (trust me, I am
> pushing hard for the author to publish it). With this patch applied you
> should never see the TSC go backwards. Period. It should be monotonic
> (to userspace, kernel rdtsc calls can still be wrong). CPUs should stay
> very nearly in sync (again, to userspace). The Thoverhead of this patch is
> pretty minimal and costs nothing unless you actually read the TSC.

There is another patch in the pipeline to make gettimeofday use
RDTSC in more cases by keeping the offsets per CPU

(this has nothing to do with syncing TSCs which is not possible
in the general case on several platforms)

I don't think it makes too much sense to hack on pure RDTSC when
gtod is fast enough -- RDTSC will be always icky and hard to use.

-Andi