Re: [RFT] Please test rdtsc on various x86-64 hardware (app included)

From: Frank Kingswood
Date: Tue Apr 19 2011 - 04:11:12 EST


On 18/04/11 20:32, Andrew Lutomirski wrote:
Hi all-

I'd appreciate some help testing rdtsc's ordering wrt memory on
various hardware. You can download evil-clock-test code at:

https://gitorious.org/linux-test-utils/linux-clock-tests/blobs/raw/master/evil-clock-test.cc

A low power core2 server:

CPU vendor : GenuineIntel
CPU model : Intel(R) Core(TM)2 Duo CPU T8100 @ 2.10GHz
CPU stepping : 6
TSC flags : tsc constant_tsc
Using lfence_rdtsc because you have an Intel CPU
Will test the "lfence;rdtsc" clock.
Now test passed : margin 84 with 39213496 samples
Load3 test passed: margin 20947164 with 15 samples
Load test passed : margin 52 with 12466437 samples
Store test failed as expected: worst error 1397 with 11151528 samples

That margin number seemed a bit high, rerunning gives:

CPU vendor : GenuineIntel
CPU model : Intel(R) Core(TM)2 Duo CPU T8100 @ 2.10GHz
CPU stepping : 6
TSC flags : tsc constant_tsc
Using lfence_rdtsc because you have an Intel CPU
Will test the "lfence;rdtsc" clock.
Now test passed : margin 84 with 39201440 samples
Load3 test passed: margin 7991 with 15 samples
Load test passed : margin 52 with 12482714 samples
Store test failed as expected: worst error 2457 with 11129294 samples

Frank

--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/