[lkml]   [2011]   [Apr]   [18]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
Messages in this thread
SubjectRe: [RFT] Please test rdtsc on various x86-64 hardware (app included)
On Mon, Apr 18, 2011 at 6:10 PM, Andi Kleen <> wrote:
> I tested it on a dual Westmere-EP and a Quad Westmere-EX.
> Seems to pass everywhere.

I see a failure below...

> However I kept the default MAX_THREADS 4. Shouldn't that be
> increased for the large systems?

MAX_THREADS is just the size of a data structure -- the tests use
either two or three threads. However...

> I suspect the tests as written didn't really use the large
> systems.
> Dual:
> CPU vendor   : GenuineIntel
> CPU model    : Intel(R) Xeon(R) CPU           E5640  ...
> CPU stepping : ..
> TSC flags    : tsc rdtscp constant_tsc nonstop_tsc
> Using lfence_rdtsc because you have an Intel CPU
> Will test the "lfence;rdtsc" clock.
> Now test failed  : worst error 48 with 48647928 samples

...that's not so good. The "now test" is quite simple and really
shouldn't fail unless lfence doesn't work or the TSCs are out of sync.

Can you run from the same repository? If you
have two packages that are a little out of sync, that should show it.
(It'll take a minute or so.)

I was thinking about how BIOS or the OS would go about syncing the
TSCs on different CPUs and it's not so obvious. The problem is that
AFAICT you can't add an offset to a TSC; you have to reprogram the
whole thing. That means that the time it takes for the wrmsr to
finish is a somewhat unknown error. If you're off by, say, 70 cycles,
the now test will catch it if it ends up on the right CPUs.

FWIW, I can't reproduce this on a dual-package Xeon E5520.

To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to
More majordomo info at
Please read the FAQ at

 \ /
  Last update: 2011-04-19 04:19    [W:0.092 / U:1.488 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site