Re: [patch] __volatile__ needed in get_cycles()?

Tigran Aivazian (tigran@sco.COM)
Mon, 29 Mar 1999 17:11:18 +0100 (BST)


On Mon, 29 Mar 1999, Richard Henderson wrote:
> Adding the volatile makes the asm act as a scheduling barrier.

Yes, but only on P5 (below P5 there is no rdtsc at all) architecture. Due
to the speculative execution of the P6 and above you will also need a
serializing instruction (e.g. cpuid) to make it a true "barrier".

Regards,
Tigran.

-
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/