Re: Is it possible to get 100microsecond timer resolution using the CPU TSC?
- From: Bob Hauck <postmaster@xxxxxxxxxxxxxxxxxxxxx>
- Date: Thu, 24 Apr 2008 08:06:44 -0400
On Wed, 23 Apr 2008 06:18:10 -0700 (PDT), avi01
<kurup.avinash@xxxxxxxxx> wrote:
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).
Look at http://www.xenomai.org/
That's a hard real-time layer for Linux. It supports the POSIX
real-time API from user space without having to write a kernel module
(although you can do that too). It is specifically designed to support
the kind of thing you're trying to do.
I use Xenomai to run a user-space task at 1 mS intervals (product is a
motion controller). There is +/- 10 uS jitter, with occasional hits to
+/- 40 uS when the system is heavily loaded during an overnight test
run. The hardware is a PC/104 card with a Celeron 700 MHz and VIA
chipset, kernel 2.6.24.2. I measure the jitter using a digital storage
scope connected to an output pin that's toggled by the task.
Xenomai will get you pretty close to the latency and jitter that the
hardware is capable of. Some hardware is better than what I'm using,
some is worse, and it depends a lot more on the chipset and CPU
architecture than on raw CPU speed. You also have to make sure that
power management and USB emulation aren't doing things behind your back.
Look at the mailing lists at the above site for more info on these
issues.
I think 100 uS might be pushing things a little unless you can tolerate
10% jitter.
--
-| Bob Hauck
-| http://www.haucks.org/
.
- Follow-Ups:
- References:
- Prev by Date: Multi-core CPUs & our present Fault Finding capability
- Next by Date: Using sk_buffs that point to received data from driver memory
- Previous by thread: Re: Is it possible to get 100microsecond timer resolution using the CPU TSC?
- Next by thread: Re: Is it possible to get 100microsecond timer resolution using the CPU TSC?
- Index(es):
Relevant Pages
|