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

PrevNext  Index
DateTue, 28 Apr 2009 23:09:48 +0300
From Jussi Laako <[hidden] at sonarnerd dot net>
To"Kjetil S. Matheussen" <[hidden] at notam02 dot no>
Cc[hidden] at lists dot jackaudio dot org, [hidden] at lists dot linuxaudio dot org
In-Reply-ToKjetil S. Matheussen [LAD] How is the TSC calibration accuracy on dual core 2 computers? (And what about HPET?)
Follow-UpKjetil S. Matheussen Re: [LAD] [Jack-Devel] How is the TSC calibration accuracy on dual core 2 computers? (And what about HPET?)
Kjetil S. Matheussen wrote:
> 
> I've looked at the HPET code in jack, but am unsure how accurate it is,
> and whether there are any overhead using it?

Resolution on my machine is 1 / 14.318180 MHz. Frequency can vary
typically from 12 to 16 MHz. Access is usually rather fast through MMIO.
Accuracy can vary depending on hardware and environment, same applies
even more for TSC.

> that's the accuracy of usleep(). So it looks promising, but
> I need at least 0.1ms accuracy...

In my opinion, clock_gettime() with CLOCK_MONOTONIC is pretty good if
kernel is using reasonably good clock source. You can check the current
one by "cat
/sys/devices/system/clocksource/clocksource0/current_clocksource". Over
rather long periods, CLOCK_REALTIME with good NTP sync would probably be
a good choice.

Over what time span you would need that 0.1 ms accuracy?


	- Jussi
PrevNext  Index

1240949409.29323_0.ltw:2,a <49F7628C.7050001 at sonarnerd dot net>