[Xenomai-help] 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 ___ Xenomai-help mailing list Xenomai-help@gna.org https://mail.gna.org/listinfo/xenomai-help
Re: [Xenomai-help] no-brainer realtime issue
Steven Seeger wrote: 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? 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 signature.asc Description: OpenPGP digital signature ___ Xenomai-help mailing list Xenomai-help@gna.org https://mail.gna.org/listinfo/xenomai-help
Re: [Xenomai-help] no-brainer realtime issue
Jan Kiszka wrote: Steven Seeger wrote: 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? 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). Additionally, the output of /proc/xenomai/stat for a failing run might give some useful information. Jan ___ Xenomai-help mailing list Xenomai-help@gna.org https://mail.gna.org/listinfo/xenomai-help -- Philippe. ___ Xenomai-help mailing list Xenomai-help@gna.org https://mail.gna.org/listinfo/xenomai-help