Timing Issues on x86_32 SMP
Hi,
I'm currently running an x86_32 SMP system and facing some issues with periodic tasks. I'd like to get a bit more information on a few assumptions I've made.
Quick sum-up of my setup:
- adeos-ipipe-2.6.23-i386-1.12-03
- xenomai-2.4.3.patch
- Core 2 Duo x86_32 running in SMP
- Linux 2.6.23.17
- Timer frequency: 1000 Hz
- Tick-less mode activated (CONFIG_NO_HZ)
- Xenomai Periodic Timing enabled (CONFIG_XENO_OPT_TIMING_PERIODIC)
- tasks are kernel-based.
I'm trying to schedule a periodic task each 8ms and I'm running into period miss (loosing from 5 up to 75, which is quite A LOT). The problem however doesn't appear on UP system (or at least when booting the kernel with maxcpus=1 ).
I'd like to have more information regarding timer handling.
First, I create my 8ms periodic task, the following way:
SRTIME ticks; int period = 8; /* need to feed with nano-seconds, then convert to CPU ticks */ ticks = rt_timer_ns2ticks(1000000 * period); rt_task_set_periodic (task, TM_NOW, ticks);
Is it the correct way to do ?
It seems the rt_timer_ns2ticks() function is useless, i.e. it seems that 1 tick = 1 ns, which sees weird to me.
Also, what does the rt_timer_read() function really return in my context ? Jiffies ? Nanoseconds ? Clock ticks ?
From the different headers and documentation pieces I've read, none seem to be really explicit regarding the returned value.
Any help, is really appreciated.
Ben
Quoted 10 lines · Benjamin ZORES
Hi,
I'm currently running an
x86_32SMP system and facing some issues with periodic tasks.
I'd like to get a bit more information on a few assumptions I've made.Quick sum-up of my setup:
- adeos-ipipe-2.6.23-i386-1.12-03
- xenomai-2.4.3.patch
- Core 2 Duox86_32running in SMP
Why not x86_64 ?
Quoted 11 lines
- Linux 2.6.23.17
- Timer frequency: 1000 Hz
- Tick-less mode activated (CONFIG_NO_HZ)
- Xenomai Periodic Timing enabled (CONFIG_XENO_OPT_TIMING_PERIODIC)
- tasks are kernel-based.I'm trying to schedule a periodic task each 8ms and I'm running into period miss
(loosing from 5 up to 75, which is quite A LOT). The problem however doesn't appear
on UP system (or at least when booting the kernel with maxcpus=1 ).
Have you run the latency test to know if you have no hardware issue ?
Signature · 1 line
Gilles
Quoted 7 lines · Gilles Chanteperdrix
On Tue, May 6, 2008 at 10:11 AM, Benjamin ZORES
<[email protected]> wrote:Why not
x86_64?
Cause I don't need 64 bits.
Quoted 4 lines
Have you run the latency test to know if you have no hardware issue ?
Do you have a quick way to start this test ?
Regards,
Ben
Quoted 9 lines · Benjamin ZORES
Quoted 7 lines · Gilles Chanteperdrix
On Tue, May 6, 2008 at 10:11 AM, Benjamin ZORES
<[email protected]> wrote:Why not
x86_64?
Quoted 7 lines
Cause I don't need 64 bits.
Quoted 4 lines
Have you run the latency test to know if you have no hardware issue ?
Do you have a quick way to start this test ?
cd /usr/xenomai/testsuite/latency
./runt
Signature · 1 line
Gilles