Skip to contentSkip to conversation

ensuring code running in kernel modules has realtime priority

Xenomai-help RT 3 participants 3 messages Jan 18, 2012 – Jan 20, 2012

lore
Share & tools
lore

RT

author
#0 lore raw

Hi all,

we have an interesting situation. We are using a module to do communication over a network (ethercat master module) to some remote IO.

The ethercat module is loaded against the kernel in the normal manner.

Now we possibly have overlooked that even though the call to the ethercat module (ioctl call) from our real-time application takes place in a xenomai real time task, the code of the ethercatmodule may be interrupted by other processes running on the machine. Due to the fact that the modules code is not running in any real-time prioritized space.

If this is indeed the case, what would be the best or easiest manner to ensure that the module does not get interrupted, ie. to encapsulate it into the xenomai real-time priority sphere?

Hope someone can point us in the right direction here. Its pretty urgent because the system is already running live and we are intermittently encountering this problem.

Kind regards,

Roland.

#1 lore raw
Quoted 13 lines · RT

Hi all,

we have an interesting situation. We are using a module to do communication over a network (ethercat master module) to some remote IO.

The ethercat module is loaded against the kernel in the normal manner.

Now we possibly have overlooked that even though the call to the ethercat module (ioctl call) from our real-time application takes place in a xenomai real time task, the code of the ethercatmodule may be interrupted by other processes running on the machine. Due to the fact that the modules code is not running in any real-time prioritized space.

Quoted 7 lines

If this is indeed the case, what would be the best or easiest manner to ensure that the module does not get interrupted, ie. to encapsulate it into the xenomai real-time priority sphere?

Hope someone can point us in the right direction here. Its pretty urgent because the system is already running live and we are intermittently encountering this problem.

If I understand correctly, what you need is to rewrite the ethercat driver as a real-time driver using the RTDM skin.

Signature · 1 line
					    Gilles.
#2 lore raw

Hi Roland,

i think that there is a commercial ethercat master with a xenomai rtdm interface available
from koenig ( https://koenig-pa.com )

We are using a open source linux ethercat master ( http://www.etherlab.org/de/ethercat/index.php )
from IGH.

I have developed a xenomai rtdm realtime interface for this igh ethercat master. All sources of this interface are now part of the development tree of the IGH- ethercat Master and can be downloaded from the IGH- website.

My way was to do all initializations and slow non realtime stuff ( SDO etc.) with the linux device interface and attach the rtdm driver to the running master and port only the "send","receive" and "process domain" ioctrl to rtdm. But this will only work if your master will not use the linux network layer.

The IGH master works, because special patched network drivers are part of the project and there is no other linux interfacing in the real time path . ( The Igh Master is designed for RTAI )

Mit freundlichen Grüßen / Best Regards
Bernd Benner
MH/SGT3
moehwald
Bosch Group
Moehwald GmbH
Michelinstraße 21
66424 Homburg
GERMANY
www.moehwald.de
Tel.: +49 (0)6841 707-229
[email protected]
Moehwald GmbH, Sitz/Registered Office: Homburg/Saar, Zentrales Handelsregister/Registered Court: Saarbrücken HRB 2812 Geschäftsführung/Managing Directors: Christian Artmann, Wolfgang Geenen

-----Ursprüngliche Nachricht-----
Von: [email protected] [mailto:[email protected]] Im Auftrag von Gilles Chanteperdrix
Gesendet: Mittwoch, 18. Januar 2012 11:52
An: [email protected]
Cc: RT; [email protected]
Betreff: Re: [Xenomai-help] ensuring code running in kernel modules has realtime priority

Quoted 13 lines · RT

Hi all,

we have an interesting situation. We are using a module to do communication over a network (ethercat master module) to some remote IO.

The ethercat module is loaded against the kernel in the normal manner.

Now we possibly have overlooked that even though the call to the ethercat module (ioctl call) from our real-time application takes place in a xenomai real time task, the code of the ethercatmodule may be interrupted by other processes running on the machine. Due to the fact that the modules code is not running in any real-time prioritized space.

Quoted 7 lines

If this is indeed the case, what would be the best or easiest manner to ensure that the module does not get interrupted, ie. to encapsulate it into the xenomai real-time priority sphere?

Hope someone can point us in the right direction here. Its pretty urgent because the system is already running live and we are intermittently encountering this problem.

If I understand correctly, what you need is to rewrite the ethercat driver as a real-time driver using the RTDM skin.

--
Gilles.

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