From: Fernando Lopez-Lezcano <nando@ccrma.Stanford.EDU>
To: Ingo Molnar <mingo@elte.hu>
Cc: Steven Rostedt <rostedt@goodmis.org>,
linux-kernel@vger.kernel.org,
"Paul E. McKenney" <paulmck@us.ibm.com>,
"K.R. Foley" <kr@cybsft.com>,
Thomas Gleixner <tglx@linutronix.de>,
pluto@agmk.net, john cooper <john.cooper@timesys.com>,
Benedikt Spranger <bene@linutronix.de>,
Daniel Walker <dwalker@mvista.com>,
Tom Rini <trini@kernel.crashing.org>,
George Anzinger <george@mvista.com>
Subject: Re: test time-warps [was: Re: 2.6.14-rt13]
Date: Tue, 22 Nov 2005 09:49:26 -0800 [thread overview]
Message-ID: <1132681766.21797.10.camel@cmn3.stanford.edu> (raw)
In-Reply-To: <20051122111623.GA948@elte.hu>
On Tue, 2005-11-22 at 12:16 +0100, Ingo Molnar wrote:
> * Steven Rostedt <rostedt@goodmis.org> wrote:
>
> > Hi Ingo,
> >
> > I'm running -rt13 with the following command line:
> >
> > root=/dev/md0 ro console=ttyS0,115200 console=tty0 nmi_watchdog=2 lapic
> > earlyprintk=ttyS0,115200 idle=poll
> >
> > I just got the following output:
> >
> > $ ./time-warp-test
> > #CPUs: 2
> > running 2 tasks to check for time-warps.
> > warp .. -5 cycles, ... 0000004fc2ab2b7f -> 0000004fc2ab2b7a ?
> > warp .. -12 cycles, ... 000000506d1d558c -> 000000506d1d5580 ?
> > warp .. -97 cycles, ... 000000536c8868d3 -> 000000536c886872 ?
> > warp .. -99 cycles, ... 00000059ae9d49a1 -> 00000059ae9d493e ?
> > warp .. -110 cycles, ... 00000059ed0f05d6 -> 00000059ed0f0568 ?
> > warp .. -118 cycles, ... 0000007392963142 -> 00000073929630cc ?
> > warp .. -122 cycles, ... 0000007d6a94bc76 -> 0000007d6a94bbfc ?
> > warp .. -346 cycles, ... 0000008acf28a18e -> 0000008acf28a034 ?
> > warp .. -390 cycles, ... 0000008b2fc61fef -> 0000008b2fc61e69 ?
>
> i've attached an updated utility below.
I'm adding a run with:
echo "tsc"> /sys/devices/system/clocksource/clocksource0/clocksource
_not_ booted with idle=poll
at the end of this email.
> But i too can see similar output
> on an X2. A TSC-warp of 390 cycles _might_ be OK, but there are no
> guarantees.
In my experience the amount seems to be related to how long the system
has been up. Which is to be expected if the two TSCs drift, right?
> It wont show up as a usecs-level (i.e. gettimeofday()) warp,
> because 390 cycles is still much lower than the ~2000 cycles one
> microsecond takes, but it could cause problems for other TSC users.
>
> Basically if there is an observable and provable warp in the TSC output
> then it must not be used for any purpose that is not strictly
> per-CPU-ified (such as userspace threads bound to a single CPU, and the
> TSC never used between threads).
Apparently that's the case.
John Stultz just released a new version of his patch that takes care of
not using the TSC as a time source on X2's. Hopefully that will make its
way to the -rt patches soon :-) This would take care of the key repeat /
screensaver problems (I just saw a post yesterday on linux-audio-user
about someone else on an X2 processor having the same problems), Jack
will need a patch to use gettimeofday in those cases.
Is /sys/devices/system/clocksource/clocksource0/clocksource part of the
standard kernel tree? I was thinking on using that for the Jack patch to
decide whether to use tsc or not (ie: if it is good enough for the
kernel it should be good enough for Jack).
To all involved, a big _THANKS_ for helping track this very annoying
problem!
-- Fernando
# time ./time-warp
2 CPUs, running 2 parallel test-tasks.
checking for time-warps via:
- read time stamp counter (RDTSC) instruction (cycle resolution)
- gettimeofday (TOD) syscall (usec resolution)
new TOD-warp maximum: -4398046507 usecs, 0004062bea76af5b ->
0004062ae451d230
new TSC-warp maximum: -3122849 cycles, 00009a5f725821a3 ->
00009a5f72287b02
new TSC-warp maximum: -3123428 cycles, 00009a5f725b26a8 ->
00009a5f722b7dc4
new TSC-warp maximum: -3123690 cycles, 00009a60ccc01765 ->
00009a60cc906d7b
new TSC-warp maximum: -3123793 cycles, 00009a61a5897c78 ->
00009a61a559d227
new TSC-warp maximum: -3123965 cycles, 00009a68b7481924 ->
00009a68b7186e27
new TSC-warp maximum: -3123966 cycles, 00009a68b754b37b ->
00009a68b725087d
new TSC-warp maximum: -3124141 cycles, 00009a68c003e8ee ->
00009a68bfd43d41
new TSC-warp maximum: -3124253 cycles, 00009a68c8b511d9 ->
00009a68c88565bc
new TSC-warp maximum: -3124268 cycles, 00009a68d2bcaaad ->
00009a68d28cfe81
new TSC-warp maximum: -3124269 cycles, 00009a68eedd440e ->
00009a68eead97e1
new TSC-warp maximum: -3124280 cycles, 00009a68eefefe95 ->
00009a68eecf525d
new TSC-warp maximum: -3124342 cycles, 00009a6907369ac7 ->
00009a690706ee51
new TSC-warp maximum: -3124592 cycles, 00009a69147b7019 ->
00009a69144bc2a9
new TSC-warp maximum: -3124609 cycles, 00009a69aa0dd745 ->
00009a69a9de29c4
new TSC-warp maximum: -3124637 cycles, 00009a69df64a2ff ->
00009a69df34f562
new TSC-warp maximum: -3124652 cycles, 00009a6a649d4a10 ->
00009a6a646d9c64
new TSC-warp maximum: -3124663 cycles, 00009a6ad73c29e2 ->
00009a6ad70c7c2b
new TSC-warp maximum: -3124699 cycles, 00009af351a28fbb ->
00009af35172e1e0
| # of TSC-warps:185478076 | # of TOD-warps:185477650 \
real 6m58.633s
user 5m17.436s
sys 1m27.135s
next prev parent reply other threads:[~2005-11-22 17:50 UTC|newest]
Thread overview: 56+ messages / expand[flat|nested] mbox.gz Atom feed top
2005-11-15 9:08 2.6.14-rt13 Ingo Molnar
2005-11-15 16:36 ` 2.6.14-rt13 Mark Knecht
2005-11-15 19:57 ` 2.6.14-rt13 Paul E. McKenney
2005-11-16 3:48 ` 2.6.14-rt13 K.R. Foley
2005-11-16 8:40 ` 2.6.14-rt13 Ingo Molnar
2005-11-16 17:02 ` 2.6.14-rt13 Paul E. McKenney
2005-11-18 18:02 ` 2.6.14-rt13 Fernando Lopez-Lezcano
2005-11-18 21:54 ` 2.6.14-rt13 Lee Revell
2005-11-18 22:05 ` 2.6.14-rt13 Fernando Lopez-Lezcano
2005-11-18 22:07 ` 2.6.14-rt13 Ingo Molnar
2005-11-18 22:15 ` 2.6.14-rt13 Lee Revell
2005-11-18 22:25 ` 2.6.14-rt13 Steven Rostedt
2005-11-18 23:36 ` 2.6.14-rt13 Fernando Lopez-Lezcano
2005-11-18 23:57 ` 2.6.14-rt13 Steven Rostedt
2005-11-18 22:41 ` 2.6.14-rt13 Fernando Lopez-Lezcano
2005-11-19 2:39 ` 2.6.14-rt13 Steven Rostedt
2005-11-24 15:07 ` 2.6.14-rt13 Ingo Molnar
2005-11-24 15:21 ` 2.6.14-rt13 Steven Rostedt
2005-11-25 20:56 ` [RFC][PATCH] Runtime switching to idle_poll (was: Re: 2.6.14-rt13) Steven Rostedt
2005-11-26 13:05 ` Ingo Molnar
2005-11-29 2:48 ` [RFC][PATCH] Runtime switching of the idle function [take 2] Steven Rostedt
2005-11-29 3:02 ` Andrew Morton
2005-11-29 3:42 ` Steven Rostedt
2005-11-29 4:01 ` Andrew Morton
2005-11-29 6:44 ` Ingo Molnar
2005-11-29 6:55 ` Nick Piggin
2005-11-29 18:05 ` Andi Kleen
2005-11-29 14:19 ` Steven Rostedt
2005-11-29 14:50 ` Andi Kleen
2005-11-29 15:42 ` Steven Rostedt
2005-12-02 1:27 ` Max Krasnyansky
2005-12-02 1:45 ` Andi Kleen
2005-12-03 2:17 ` Max Krasnyansky
2005-11-29 4:22 ` john stultz
2005-11-29 14:22 ` Steven Rostedt
2005-11-29 13:08 ` Pavel Machek
2005-12-18 15:26 ` Steven Rostedt
2005-11-18 22:13 ` 2.6.14-rt13 Lee Revell
2005-11-18 22:32 ` 2.6.14-rt13 Vojtech Pavlik
2005-11-19 2:28 ` 2.6.14-rt13 George Anzinger
2005-11-19 7:45 ` 2.6.14-rt13 Vojtech Pavlik
2005-11-19 18:27 ` 2.6.14-rt13 Lee Revell
2005-11-21 21:32 ` 2.6.14-rt13 Fernando Lopez-Lezcano
2005-11-21 21:41 ` 2.6.14-rt13 john stultz
[not found] ` <20051121221511.GA7255@elte.hu>
2005-11-21 22:19 ` test time-warps [was: Re: 2.6.14-rt13] Ingo Molnar
2005-11-21 23:08 ` Fernando Lopez-Lezcano
2005-11-21 23:38 ` Fernando Lopez-Lezcano
2005-11-21 23:41 ` john stultz
2005-11-22 1:31 ` Lee Revell
2005-11-22 1:15 ` Steven Rostedt
2005-11-22 11:16 ` Ingo Molnar
2005-11-22 17:49 ` Fernando Lopez-Lezcano [this message]
2005-11-22 18:01 ` Christopher Friesen
2005-11-22 18:22 ` Steven Rostedt
2005-11-22 20:52 ` Ingo Molnar
2005-11-22 11:19 ` 2.6.14-rt13 Ingo Molnar
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=1132681766.21797.10.camel@cmn3.stanford.edu \
--to=nando@ccrma.stanford.edu \
--cc=bene@linutronix.de \
--cc=dwalker@mvista.com \
--cc=george@mvista.com \
--cc=john.cooper@timesys.com \
--cc=kr@cybsft.com \
--cc=linux-kernel@vger.kernel.org \
--cc=mingo@elte.hu \
--cc=paulmck@us.ibm.com \
--cc=pluto@agmk.net \
--cc=rostedt@goodmis.org \
--cc=tglx@linutronix.de \
--cc=trini@kernel.crashing.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®