Skip to contentSkip to conversation

Xenomai/SOLO - RTOS emulation for standard Linux

Xenomai-core Wolfgang Denk 4 participants 11 messages Mar 20, 2008 – Mar 28, 2008

lore
Share & tools
lore
#0 lore raw

Hello all,

DENX Software Engineering is proud to announce Xenomai/SOLO, the new RTOS emulator that runs as a normal user-space application on a standard Linux kernel. Of course, when timing requirements have to be met, a real-time capable Linux kernel with the PREEMPT_RT support enabled should be used.

Philippe Gerum, the author of the code, writes:

Some weeks ago, I started laying the groundwork for porting the Xenomai emulators natively over the PREEMPT_RT kernel. Unlike the co-kernel based Xenomai version, SOLO does not require any kernel support from additional modules or patches. It is fully based on the standard POSIX library, and runs as a regular process controlled by a single image Linux kernel.

As a first step, a VxWorks emulator has just been rebuilt over this new framework.

This framework is not another window-dressing of the existing Xenomai 2.x core, but really something 100% redesigned and rewritten for running on a native real-time Linux implementation, while keeping the opportunity to adapt it back to a co-kernel system. At some point, I'd like to make both the native and co-kernel Xenomai incarnations converge on the basis of this new core interface for Xenomai 3, so that we would be able to share the APIs between them. In short, SOLO is a necessary intermediate step on the road to Xenomai 3.

This work has been co-sponsored by the OSADL (http://www.osadl.org)
and DENX Software Engineering (http://www.denx.de).

For details, please see the README at
http://www.denx.de/cgi-bin/gitweb.cgi?p=xenomai-solo.git;a=blob;f=README

You can pull the whole code from
git://www.denx.de/git/xenomai-solo.git resp.
http://www.denx.de/git/xenomai-solo.git or browse it at
http://www.denx.de/cgi-bin/gitweb.cgi?p=xenomai-solo.git;a=summary

Best regards,

Wolfgang Denk

Signature · 5 lines
DENX Software Engineering GmbH,     MD: Wolfgang Denk & Detlev Zundel
HRB 165235 Munich, Office: Kirchenstr.5, D-82194 Groebenzell, Germany
Phone: (+49)-8142-66989-10 Fax: (+49)-8142-66989-80 Email: [email protected]
Quote from the Boss... "I didn't say it was your fault.  I said I was
going to blame it on you."
#1 lore raw

Hi,

Quoted 5 lines · Wolfgang Denk

DENX Software Engineering is proud to announce Xenomai/SOLO, the new RTOS emulator that runs as a normal user-space application on a standard Linux kernel. Of course, when timing requirements have to be met, a real-time capable Linux kernel with the PREEMPT_RT support enabled should be used.

Thanks very much for this package!

Is it worth providing a separate xenomai-solo package in Debian right now (considering it being propagated to Debian 5.0 and supported there in this form until ca. 2010), or should we wait until Xenomai/SOLO is integrated into Xenomai mainline?

bye,
Roland

#2 lore raw

Dear Roland,

Quoted 5 lines · in message <[email protected]> you wrote:

Is it worth providing a separate xenomai-solo package in Debian right now (considering it being propagated to Debian 5.0 and supported there in this form until ca. 2010), or should we wait until Xenomai/SOLO is integrated into Xenomai mainline?

Integration into Xenomai mainline means waiting for Xenomai 3, which seems still a pretty long way to go.

On the other hand, you need a PREEMPT_RT enhanced Linux kernel for Xenomai/SOLO to provide real-time behaviour which is probably needed in most cases when you try and emulate a RTOS. This is probably a bigger hurdle?

Best regards,

Wolfgang Denk

Signature · 5 lines
DENX Software Engineering GmbH,     MD: Wolfgang Denk & Detlev Zundel
HRB 165235 Munich, Office: Kirchenstr.5, D-82194 Groebenzell, Germany
Phone: (+49)-8142-66989-10 Fax: (+49)-8142-66989-80 Email: [email protected]
It is clear that the individual who persecutes a  man,  his  brother,
because he is not of the same opinion, is a monster.       - Voltaire
#3 lore raw

Hi,

Quoted 5 lines · Wolfgang Denk
Quoted 4 lines

Is it worth providing a separate xenomai-solo package in Debian right now (considering it being propagated to Debian 5.0 and supported there in this form until ca. 2010), or should we wait until Xenomai/SOLO is integrated into Xenomai mainline?

Quoted 7 lines

Integration into Xenomai mainline means waiting for Xenomai 3, which seems still a pretty long way to go.

On the other hand, you need a PREEMPT_RT enhanced Linux kernel for Xenomai/SOLO to provide real-time behaviour which is probably needed in most cases when you try and emulate a RTOS. This is probably a bigger hurdle?

I think an RT-patched kernel is quite common, at least if I consider the realtime conscious Debian user community. For other realtime applications such as JACK (though in a completely different application domain), the respective kernels are also often presumed.

So if we are talking about Xenomai 3 in the order of years, Xenomai/SOLO as a separate package seems worth considering if it matures reasonably.

The other "desktop suitable" approach is the simulator. Both Xenomai/SOLO and the simulator are good candidates for inclusion in the OS distribution since (apart from certain kernel requirements) they can be provided as universal binary packages in userspace.

The problem with xenosim is its dependency upon gcc-2.95.6 sources. Since Debian packages must provide the complete sources for building the binary packages or alternatively/additionally have build dependencies satisfied by other (binary) Debian packages in the distribution, this is not an easy task (without gcc 2.95.x being in Debian anymore). One way to go could be utilizing a newer GCC (4.x) instead of 2.95.x, but that doesn't work with current xenosim. Is it worth it to put porting effort into this spot?

Thanks!

bye,
Roland

#4 lore raw

I'll of course have to make my own tests, but I am curious - do folks expect that Xenomai/SOLO will be able to equal the interrupt performance of Xenomai/IPIPE? I guess my intuition says that the IPIPE approach would guarantee better interrupt response, but maybe my intuition is completely wrong. I'll try to post some results in a few weeks...

Steve Falco

#5 lore raw
Quoted 5 lines · In message <[email protected]> you wrote:

I'll of course have to make my own tests, but I am curious - do folks expect that Xenomai/SOLO will be able to equal the interrupt performance of Xenomai/IPIPE? I guess my intuition says that the IPIPE approach would guarantee better interrupt response, but maybe my intuition is completely wrong. I'll try to post some results in a few weeks...

Well, interrupt performance is just one thing. The whole real-time behaviour depends on the underlying OS. And frankly, what we've seen so far means that PREEMPT_RT can deliver "probabilistic" real-time at best. Take a test case that has been running fine and just put it into a new environment (like attach it to a different network), and it will behave differently. Just plug in a new USB device that hasn't been tested before, and nobody can tell what will happen.

If it comes to hard, reliable real-time behaviour, we recommend Xenomai/ipipe to all our customers. However, there are some who think it is important to have an "original, unpatched" kernel.org source tree. These obviously run for PREEMPT_RT, and SOLO.

Best regards,

Wolfgang Denk

Signature · 6 lines
DENX Software Engineering GmbH,     MD: Wolfgang Denk & Detlev Zundel
HRB 165235 Munich, Office: Kirchenstr.5, D-82194 Groebenzell, Germany
Phone: (+49)-8142-66989-10 Fax: (+49)-8142-66989-80 Email: [email protected]
"You know, after a woman's raised a family and so on,  she  wants  to
start living her own life."   "Whose life she's _been_ living, then?"
                                  - Terry Pratchett, _Witches Abroad_
#6 lore raw
Quoted 4 lines · Wolfgang Denk

If it comes to hard, reliable real-time behaviour, we recommend Xenomai/ipipe to all our customers. However, there are some who think it is important to have an "original, unpatched" kernel.org source tree. These obviously run for PREEMPT_RT, and SOLO.

Please remember that PREEMPT_RT currently doesn't mean "unpatched", so you could theoretically patch every PREEMPT_RT enhanced kernel with ipipe instead... ;->

(Feelings of customers are a completely different thing, though...)

Roland

#7 lore raw
In reply to Steven A. Falco
Quoted 6 lines · Steven A. Falco

I'll of course have to make my own tests, but I am curious - do folks expect that Xenomai/SOLO will be able to equal the interrupt performance of Xenomai/IPIPE? I guess my intuition says that the IPIPE approach would guarantee better interrupt response, but maybe my intuition is completely wrong. I'll try to post some results in a few weeks...

SOLO is not about pretending that native preemption should now be the one and only solution to real-time requirements. The point is that there are different levels of real-time requirements, different real-time applications, different real-time environments. Since I just don't believe in the one-fits-it-all marketroïd message, SOLO is there to bring the Xenomai emulators to the native preemption world, because a significant portion of the application base to be migrated to Linux will be just fine in that environment.

FWIW, I like the co-kernel approach for the principle of least surprise it brings with respect to latency; if the latency tests run fine, it is extremely likely that deadlines will always be met within the application, provided the latter behaves properly, even if you upgrade your target kernel. But on the other hand, I like the native preemption as well, for its ability to keep things reasonably simple when it comes to port large legacy applications, which used to rely on zillions of libraries; in that case, the necessary co-kernel/Linux programming model split is just a massive pain in the neck (i.e. primary & secondary runtime modes, restriction on using the glibc in real-time mode and so on).

But obviously, the co-kernel mode based on the I-pipe is here to stay, and the purpose of Xenomai 3 is to allow the emulators to be usable on top of both real-time cores (i.e. PREEMPT_RT, or I-pipe + nucleus), using a simple recompilation. SOLO is an intermediate step, before both approaches are reconciled with a common emulator code base in Xenomai 3. In other words: two real-time cores, one set of emulators. Well, that's the plan.

I will send a roadmap to Xenomai 3 asap (take this literally, because of hectic schedule here), to explain where we are heading to.

Quoted 8 lines

Steve Falco

_______________________________________________
Xenomai-core mailing list
[email protected]
https://mail.gna.org/listinfo/xenomai-core

Signature · 1 line
Philippe.
#8 lore raw
Quoted 11 lines · Philippe Gerum

But obviously, the co-kernel mode based on the I-pipe is here to stay, and the purpose of Xenomai 3 is to allow the emulators to be usable on top of both real-time cores (i.e. PREEMPT_RT, or I-pipe + nucleus), using a simple recompilation. SOLO is an intermediate step, before both approaches are reconciled with a common emulator code base in Xenomai 3. In other words: two real-time cores, one set of emulators. Well, that's the plan.

I will send a roadmap to Xenomai 3 asap (take this literally, because of hectic schedule here), to explain where we are heading to.

Thanks for the clarification - I was not sure of the intent for SOLO, but now it makes sense. I'm glad that IPIPE is not going away, as my application will need hard real time.

Steve

#9 lore raw
In reply to Roland Stigge
Quoted 4 lines · Roland Stigge

So if we are talking about Xenomai 3 in the order of years, Xenomai/SOLO as a separate package seems worth considering if it matures reasonably.

It is not in the order of years, but likely weeks, to get the four traditional RTOS emulators currently available from 2.x running on top of the SOLO core (Btw, I've just committed the early version of the pSOS emulator to the GIT tree which still needs heavy testing though).

Before packaging this, I would recommend to wait for significant test suites to be available for all of them; I guess this should be the case by the end of May, if the current pace can be sustained.

Quoted 5 lines

The other "desktop suitable" approach is the simulator. Both Xenomai/SOLO and the simulator are good candidates for inclusion in the OS distribution since (apart from certain kernel requirements) they can be provided as universal binary packages in userspace.

Quoted 9 lines

The problem with xenosim is its dependency upon gcc-2.95.6 sources. Since Debian packages must provide the complete sources for building the binary packages or alternatively/additionally have build dependencies satisfied by other (binary) Debian packages in the distribution, this is not an easy task (without gcc 2.95.x being in Debian anymore). One way to go could be utilizing a newer GCC (4.x) instead of 2.95.x, but that doesn't work with current xenosim. Is it worth it to put porting effort into this spot?

The simulator is really a nice tool, but its code instrumenter was written ten years ago as a patch against egcs-1.0, then subsequently upgraded a number of times, up to 2.95.3. Unfortunately, upgrading this patch to gcc 3.x or even 4.x would be a very significant work, because I hooked the instrumentation engine right into the C/C++ parser stage, and this area of code has been very deeply refactored over the years (actually, even replaced IIRC).

To my knowledge, only two people "officially" use the simulator, specifically for debugging the Xenomai core, i.e. Gilles and myself, so there is not much traction on this side. We just grab some outdated box on which we can rebuild xenosim, and we live with it this way.

I feel it's sort of a shame, since IMHO, event-driven simulation is just the ultimate way for efficient debugging and modelling real-time behaviour, but well, it would really be a project on its own to revamp it, and lack of time bites everyone.

Signature · 1 line
Philippe.
#10 lore raw
Quoted 7 lines · Philippe Gerum
Quoted 3 lines · Roland Stigge

So if we are talking about Xenomai 3 in the order of years, Xenomai/SOLO as a separate package seems worth considering if it matures reasonably.

It is not in the order of years, but likely weeks, to get the four traditional RTOS emulators currently available from 2.x running on top of the SOLO core

Just to prevent any confusion:

- Xenomai/SOLO as a Debian package would make sense in a few weeks
- Xenomai 3 is a matter of months, given that a significant part of the job will be directly available from the SOLO effort (i.e. have the RTOS emulators run in
user-space natively).

Signature · 1 line
Philippe.