Skip to contentSkip to conversation

How to chose between xenomai and preempt RT

Xenomai-help Adrien LECOINTRE 2 participants 4 messages Jun 3, 2009 1 message not in the archive

lore
Share & tools
lore
#1 lore raw
In reply to a message not in the archive
Quoted 2 lines · Jeff Angielski

Of course, just by choosing to use Xenomai, you don't get hard realtime.
You still need to design your system and software correctly.

Yes but a software can be well designed on PREEMPT_RT as well.
I built a kernel and a filesystem with the less possible number of driver. After startup there is only an ATA driver and bash running on my system! In this situation I really doubt that a big latency can occurs.

Then if my real-time software uses a specific device I just have to write my own driver (instead of using a "basic" linux driver) if I want to know exactly what's going on my system and keep a hard real-time behavior.

Those are basics things that we always do when designing a real-time software on any RT OS.

Of course for a real-time software with a lot of non-real-time loads it's probably easier to use Xenomai and let Linux deals with loads.

I read a lot of things about PREEMPT_RT not providing hard real-time but I coudn't find any test case which shows that. My loads are probably not good enough but it shouldn't be so difficult to find a way to cause a significant latency on a supposed non-hard-real-time OS.

Adrien.

#2 lore raw
Quoted 10 lines · Adrien LECOINTRE
Quoted 3 lines · Jeff Angielski

Of course, just by choosing to use Xenomai, you don't get hard realtime. You still need to design your system and software correctly.

Yes but a software can be well designed on PREEMPT_RT as well. I built a kernel and a filesystem with the less possible number of driver. After startup there is only an ATA driver and bash running on my system! In this situation I really doubt that a big latency can occurs.

Modern ATA means DMA, which means contention with the real-time system, whatever this system is. So, large disk transfers will cause big latencies.

Quoted 5 lines

Then if my real-time software uses a specific device I just have to write my own driver (instead of using a "basic" linux driver) if I want to know exactly what's going on my system and keep a hard real-time behavior.

I would say the drivers need auditing and maybe to be modified, not to be rewritten. Rewriting them is probably a waste of time, and you do not benefit from using PREEMPT_RT if you do that.

Quoted 4 lines

Those are basics things that we always do when designing a real-time software on any RT OS.

Quoted 8 lines

Of course for a real-time software with a lot of non-real-time loads it's probably easier to use Xenomai and let Linux deals with loads.

I read a lot of things about PREEMPT_RT not providing hard real-time but I coudn't find any test case which shows that. My loads are probably not good enough but it shouldn't be so difficult to find a way to cause a significant latency on a supposed non-hard-real-time OS.

You are really talking in the void as long as you do not tell us what platform you intend to use.

Signature · 1 line
					    Gilles.
#3 lore raw
Quoted 14 lines · Gilles Chanteperdrix
Quoted 9 lines · Adrien LECOINTRE
Quoted 3 lines · Jeff Angielski

Of course, just by choosing to use Xenomai, you don't get hard realtime. You still need to design your system and software correctly.

Yes but a software can be well designed on PREEMPT_RT as well. I built a kernel and a filesystem with the less possible number of driver. After startup there is only an ATA driver and bash running on my system! In this situation I really doubt that a big latency can occurs.

Modern ATA means DMA, which means contention with the real-time system, whatever this system is. So, large disk transfers will cause big latencies.

Quoted 8 lines
Quoted 4 lines

Then if my real-time software uses a specific device I just have to write my own driver (instead of using a "basic" linux driver) if I want to know exactly what's going on my system and keep a hard real-time behavior.

I would say the drivers need auditing and maybe to be modified, not to be rewritten. Rewriting them is probably a waste of time, and you do not benefit from using PREEMPT_RT if you do that.

The minimal modification that you want to do to make a driver real-time with preempt_rt is to make its irqs non threaded and make its spinlocks good old raw spinlocks.

Signature · 1 line
					    Gilles.
#4 lore raw
In reply to Adrien LECOINTRE
Quoted 5 lines · Adrien LECOINTRE

I read a lot of things about PREEMPT_RT not providing hard real-time but I coudn't find any test case which shows that. My loads are probably not good enough but it shouldn't be so difficult to find a way to cause a significant latency on a supposed non-hard-real-time OS.

I can not leave this unanswered. This is a question of code coverage. Only when you have tested most of the code paths in the Linux kernel can you state that you have made a proper test. The only way to do this found so far (by the preempt_rt people, I believe) is to run LTP, the Linux Testing Project. And even though you do not test all the drivers in your system (except the most current ones such as ethernet and ATA).

Signature · 1 line
					    Gilles.