Re: Is it possible to get 100microsecond timer resolution using the CPU TSC?



On Apr 23, 11:18 pm, avi01 <kurup.avin...@xxxxxxxxx> wrote:
Hi All,
I'm using the 2.6.24.3 kernel and I need to write a module
that runs a function every 100 microseconds (intervals SHOULD occur @
100 microsecond intervals).
tried using the HPET (high precision event timer), but it;s
not present on my main board.
Now I need to know if it's possible to use the x86 Time
stamp counter for the above application, or can I use the ACPI timer?

Please help me!!!
Thanking U.

Avinash.

How reliably do you want the interval to be (eg: is it ok if the
interval occasionally becomes 101uS, how about 110uS) ?
If the variations above are ok, you probably can getaway with a low
latency kernel (as I could remember default kernel time slices were
100uS anyway). For it to be more consistent I would recommend using
the "Preemptible kernel" option.
However you may have to use a hardware timer interrupt if you want the
timing to be exactly at 100uS.
.



Relevant Pages

  • Re: LMbench as gcc performance regression test?
    ... The kernel versions without a suffix are the default kernel compile options. ... The compiler options only changed on the kernel. ... Processes - times in microseconds - smaller is better ... File create/delete and VM system latencies in microseconds - smaller is better ...
    (Linux-Kernel)
  • Re: [PATCH 2.6.28 1/2] memory: improve find_vma
    ... Some of the lmbench tests may be appropriate. ... I ran an lmbench test on the 2.6.28 kernel and on the same kernel ... after applying the patch. ... Simple syscall: 0.7419 / 0.4244 microseconds ...
    (Linux-Kernel)
  • Re: async I/O seems to be blocking on 2.6.15
    ... I guess you mean miliseconds, not microseconds. ... Jens Axboe ... be profiling the kernel any time soon, but thank you for your help. ...
    (Linux-Kernel)
  • measuring rather small (dozens microsecond) CPU times?
    ... few dozen or hundreds or thousands of microseconds on a 1 or 2GHz CPU, ... I am using a recent kernel. ... the 1 millisecond resolution of timessystem call is not enough ...
    (comp.os.linux.development.apps)
  • Re: [RFC][PATCH] new timeofday core subsystem (v.A0)
    ... >>The only way curent way to enter the kernel from glibc with a fastcall is ... >>The functions in the timer source structure is a central problem for IA64. ... >>attached that can simply be copied into userspace if wanted. ... If the timesource freq is a power of 2, ...
    (Linux-Kernel)