no-brainer realtime issue
I have a xenomai userspace application that does the following:
A thread of priority 90 toggles a bit (outb) to move a stepper motor.
A thread of priority 10 updates the display once a second.
The motor thread is periodic and uses rt_task_wait_period(). The display thread just uses sleep(1).
My question is this: the priority 90 thread is higher priority, and doesn't do anything relating to linux system calls. Whenever the display thread updates the display, the motor thread stalls momentarily.
Any idea why this is?
Steven
Quoted 4 lines · Steven Seeger
I have a xenomai userspace application that does the following:
A thread of priority 90 toggles a bit (outb) to move a stepper motor.
Quoted 8 lines
A thread of priority 10 updates the display once a second.
The motor thread is periodic and uses
rt_task_wait_period(). The display thread just uses sleep(1).My question is this: the priority 90 thread is higher priority, and doesn't do anything relating to linux system calls. Whenever the display thread updates the display, the motor thread stalls momentarily.
X-window graphic card driver masking hw IRQs? You should see that too when running the latency tests while moving windows around the desktop.
Btw, how to you measure/observe the stalled state?
Quoted 11 lines
Any idea why this is?
Steven
_______________________________________________
Xenomai-help mailing list
[email protected]
https://mail.gna.org/listinfo/xenomai-help
Signature · 1 line
Philippe.
Quoted 6 lines · Steven Seeger
I have a xenomai userspace application that does the following:
A thread of priority 90 toggles a bit (outb) to move a stepper motor.
A thread of priority 10 updates the display once a second.
Quoted 8 lines
The motor thread is periodic and uses
rt_task_wait_period(). The display thread just uses sleep(1).My question is this: the priority 90 thread is higher priority, and doesn't do anything relating to linux system calls. Whenever the display thread updates the display, the motor thread stalls momentarily.
Any idea why this is?
If your motor thread really looks like
while (1) {
toggle_bit();
rt_task_wait_period();
}you may suffer from contentions of the related bus towards your motor (what kind of interface do you use?).
To test this, just put some instrumentation around the toggle_bit() (take timestamps and look for abnormal delays). What frequency is your motor thread running at?
If there is more code in your loop, please post the program (or a simplified but still failing version).
Jan
Quoted 28 lines · Jan Kiszka
Quoted 6 lines · Steven Seeger
I have a xenomai userspace application that does the following:
A thread of priority 90 toggles a bit (outb) to move a stepper motor.
A thread of priority 10 updates the display once a second.
Quoted 8 lines
The motor thread is periodic and uses
rt_task_wait_period(). The display thread just uses sleep(1).My question is this: the priority 90 thread is higher priority, and doesn't do anything relating to linux system calls. Whenever the display thread updates the display, the motor thread stalls momentarily.
Any idea why this is?
If your motor thread really looks like
while (1) { toggle_bit(); rt_task_wait_period(); }you may suffer from contentions of the related bus towards your motor (what kind of interface do you use?).
Quoted 6 lines
To test this, just put some instrumentation around the
toggle_bit()(take timestamps and look for abnormal delays). What frequency is your motor thread running at?If there is more code in your loop, please post the program (or a simplified but still failing version).
Additionally, the output of /proc/xenomai/stat for a failing run might give some useful information.
Quoted 11 lines
Jan
------------------------------------------------------------------------
_______________________________________________
Xenomai-help mailing list
[email protected]
https://mail.gna.org/listinfo/xenomai-help
Signature · 1 line
Philippe.