From: Andrew Lutomirski <luto@mit.edu>
To: Andi Kleen <andi@firstfloor.org>
Cc: linux-kernel@vger.kernel.org, Ingo Molnar <mingo@elte.hu>,
Linus Torvalds <torvalds@linux-foundation.org>,
x86 <x86@kernel.org>
Subject: Re: [RFT] Please test rdtsc on various x86-64 hardware (app included)
Date: Mon, 18 Apr 2011 22:15:33 -0400 [thread overview]
Message-ID: <BANLkTim_e81meeOqYH2rBx_MWHe=kiNGTw@mail.gmail.com> (raw)
In-Reply-To: <20110418221051.GR16484@one.firstfloor.org>
On Mon, Apr 18, 2011 at 6:10 PM, Andi Kleen <andi@firstfloor.org> 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 now_test_all_pairs.sh 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.
--Andy
next prev parent reply other threads:[~2011-04-19 2:15 UTC|newest]
Thread overview: 15+ messages / expand[flat|nested] mbox.gz Atom feed top
2011-04-18 19:32 Andrew Lutomirski
2011-04-18 20:16 ` Linus Torvalds
2011-04-18 20:37 ` Ingo Molnar
2011-04-19 0:38 ` Markus Trippelsdorf
2011-04-18 20:23 ` Colin Walters
2011-04-18 20:27 ` Andrew Lutomirski
2011-04-18 20:35 ` Colin Walters
2011-04-18 20:39 ` Andrew Lutomirski
2011-04-18 22:10 ` Andi Kleen
2011-04-19 2:15 ` Andrew Lutomirski [this message]
2011-04-19 0:49 ` Mihai Donțu
2011-04-19 8:10 ` Frank Kingswood
2011-04-22 14:33 ` Jan Ceuleers
2011-04-19 5:06 George Spelvin
2011-04-19 6:09 ` George Spelvin
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to='BANLkTim_e81meeOqYH2rBx_MWHe=kiNGTw@mail.gmail.com' \
--to=luto@mit.edu \
--cc=andi@firstfloor.org \
--cc=linux-kernel@vger.kernel.org \
--cc=mingo@elte.hu \
--cc=torvalds@linux-foundation.org \
--cc=x86@kernel.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox
all inboxes | Powered by JetHome®