RE: Dual core Athlons and unsynced TSCs

Steven Rostedt
2006-01-13T20:10:10Z

On Fri, 2006-01-13 at 13:55 -0500, Lee Revell wrote:

> >
> > If that's what you want to know?
>
> I want to know if clock_gettime(CLOCK_MONOTONIC, *ts) is actually
> guaranteed to be monotonic on these machines AKA do we break POSIX
> compliance or not.

Nope it doesn't work :-(

I ran this test:
http://www.kihontech.com/tests/rt/monotonic.c

And got this:

$ ./monotonic
main program pid=8477
hello from thread 0!
hello from thread 1!
hello from thread 2!
hello from thread 3!
hello from thread 4!
Failed! prev: 6279.925610302 current: 6279.874615349

$ cat /proc/cmdline
root=/dev/md0 ro console=ttyS0,115200 console=tty0 nmi_watchdog=2 lapic earlyprintk=ttyS0,115200 clock=pmtmr

$ uname -r
2.6.15-rt4-sr2

(I also added Ingo, Thomas, and John in the CC)

I'll reboot to vanilla 2.6.15 and see if that is broken too (just to
make sure)

-- Steve