[LAD] How is the TSC calibration accuracy on dual core 2 computers? (And what about HPET?)

PrevNext  Index
DateTue, 28 Apr 2009 14:46:06 +0200
From Kjetil S. Matheussen <[hidden] at notam02 dot no>
To[hidden] at lists dot linuxaudio dot org
Cc[hidden] at lists dot jackaudio dot org
Follow-UpSteve Harris Re: [LAD] How is the TSC calibration accuracy on dual core 2 computers? (And what about HPET?)
Follow-UpJussi Laako Re: [LAD] [Jack-Devel] How is the TSC calibration accuracy on dual core 2 computers? (And what about HPET?)
I'm doing some benchmarking where I need about 0.1ms accuracy.
I'm using an intel dual core 2 computer. This is for a paper,
so I just need the numbers, and the code is not going to run
on any other computer.

I've looked at the HPET code in jack, but am unsure how accurate it is,
and whether there are any overhead using it?

And I have also tried using tsc[1]. tsc seems to work perfectly,
but I don't know how accurate it is on intel dual core machines?

Testing the accuracy of tsc by bounding my thread to one processor
using sched_setaffinity and using usleep(), and comparing
with code which is forced to switch to read the tsc value from the
other CPU, shows that the accuracy of tsc when reading and writing
using two different CPUs is below 1ms since
that's the accuracy of usleep(). So it looks promising, but
I need at least 0.1ms accuracy...

Anyone know how much jitter there might be for tsc?
I've not found anything on google yet.



[1]  __asm__ __volatile__("rdtsc" : "=A" (ret))
PrevNext  Index

1240922797.19703_0.ltw:2,a <Pine.LNX.4.64-L.0904281429550.18903 at luke dot ifi dot uio dot no>