[LAD] How is the TSC calibration accuracy on dual core 2 computers? (And what about HPET?)
Kjetil S. Matheussen
k.s.matheussen at notam02.no
Tue Apr 28 12:46:06 UTC 2009
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. 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.
 __asm__ __volatile__("rdtsc" : "=A" (ret))
More information about the Linux-audio-dev