All of lore.kernel.org
 help / color / mirror / Atom feed
* [Xenomai] Question about priority coupling in primary and secondary mode
       [not found] ` <8655AC8285F53F42A4B1B3CAB3092C47235FD2F2@IVKEX2.fkfs.de>
@ 2015-08-29 15:23   ` Rothermel, Thomas
  2015-08-29 15:46     ` Gilles Chanteperdrix
  0 siblings, 1 reply; 4+ messages in thread
From: Rothermel, Thomas @ 2015-08-29 15:23 UTC (permalink / raw)
  To: xenomai@xenomai.org

Dear all,

I am quite new to Xenomai and I ran into a problem. I searched the mailing list archives several times but I did not find any solution that works for me. I use Xenomai 2.6.4 and installed the patched kernel on intel I7. Latency-test as well as xeno-test give good results.

Now my problem:
I run two periodic threads:
One high priority communication thread  handling udp communication every 1ms. For communication I use plain linux sockets (non-blocking) of which I know that they are not hard-realtime capable. However, using them is sufficient with respect to timing and latency for my application. Furthermore I can't use RTnet, because all other network nodes don't use it.
The second thread is my medium priority worker thread, which is also periodic and running every 100ms.

My problem now is that the communication thread is switching to secondary mode (because of the plain linux socket) and then handeled by the linux scheduler. The worker thread remains in primary mode and preempts the communication thread. As a result, the communication thread gets overflows.

Then I found out that from Xenomai v2.6.x on, the option XENO_OPT_PRIOCPL was disabled by default, and I recompiled the kernel with XENO_OPT_PRIOCPL enabled. Unfortunately that didn't help. As far as I understand, this option should solve my problem...

Does anyone have any hints/workaround for solving that problem?
Thanks!

Regards, Thomas





^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: [Xenomai] Question about priority coupling in primary and secondary mode
  2015-08-29 15:23   ` [Xenomai] Question about priority coupling in primary and secondary mode Rothermel, Thomas
@ 2015-08-29 15:46     ` Gilles Chanteperdrix
  2015-08-29 16:12       ` Rothermel, Thomas
  0 siblings, 1 reply; 4+ messages in thread
From: Gilles Chanteperdrix @ 2015-08-29 15:46 UTC (permalink / raw)
  To: Rothermel, Thomas; +Cc: xenomai@xenomai.org

On Sat, Aug 29, 2015 at 03:23:28PM +0000, Rothermel, Thomas wrote:
> Furthermore I can't use RTnet, because all other network nodes
> don't use it.

That is a wrong reason not to use RTnet.



> Then I found out that from Xenomai v2.6.x on, the option
> XENO_OPT_PRIOCPL was disabled by default, and I recompiled the
> kernel with XENO_OPT_PRIOCPL enabled. Unfortunately that didn't
> help. As far as I understand, this option should solve my
> problem...

The root thread priority coupling does not solve everything. In
particular, when a thread is suspended waiting for an interrupt, the
primary mode activity has priority over handling the non real-time
interrupt.

-- 
					    Gilles.
https://click-hack.org


^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: [Xenomai] Question about priority coupling in primary and secondary mode
  2015-08-29 15:46     ` Gilles Chanteperdrix
@ 2015-08-29 16:12       ` Rothermel, Thomas
  2015-08-29 17:21         ` Gilles Chanteperdrix
  0 siblings, 1 reply; 4+ messages in thread
From: Rothermel, Thomas @ 2015-08-29 16:12 UTC (permalink / raw)
  To: Gilles Chanteperdrix; +Cc: xenomai@xenomai.org

Gilles, thank you very much for your fast reply. 

>> Furthermore I can't use RTnet, because all other network nodes
>> don't use it.

>That is a wrong reason not to use RTnet.

Ok does that mean that it is possible combining RTnet and non RTnet network nodes? That would solve my problem. If the answer is yes, I couldn't figure out how to configure RTnet to  send standart UDP messages. Do I have to load the rt version of my network card driver?


>> Then I found out that from Xenomai v2.6.x on, the option
>> XENO_OPT_PRIOCPL was disabled by default, and I recompiled the
>> kernel with XENO_OPT_PRIOCPL enabled. Unfortunately that didn't
>> help. As far as I understand, this option should solve my
>> problem...

>The root thread priority coupling does not solve everything. In
>particular, when a thread is suspended waiting for an interrupt, the
>primary mode activity has priority over handling the non real-time
>interrupt.

Ok, thanks that' s  the explanation why it is not working...

Best, Thomas

>--
                                            Gilles.
>https://click-hack.org


^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: [Xenomai] Question about priority coupling in primary and secondary mode
  2015-08-29 16:12       ` Rothermel, Thomas
@ 2015-08-29 17:21         ` Gilles Chanteperdrix
  0 siblings, 0 replies; 4+ messages in thread
From: Gilles Chanteperdrix @ 2015-08-29 17:21 UTC (permalink / raw)
  To: Rothermel, Thomas; +Cc: xenomai@xenomai.org

On Sat, Aug 29, 2015 at 04:12:19PM +0000, Rothermel, Thomas wrote:
> Gilles, thank you very much for your fast reply. 
> 
> >> Furthermore I can't use RTnet, because all other network nodes
> >> don't use it.
> 
> >That is a wrong reason not to use RTnet.
> 
> Ok does that mean that it is possible combining RTnet and non
> RTnet network nodes? That would solve my problem. If the answer is
> yes, I couldn't figure out how to configure RTnet to send standart
> UDP messages.

As far as I know RTnet UDP messages are standard UDP messages, but I
never tried the TDMA access control. With the nomac access control,
you only get non standard messages when using the non real-time
interface attached to a real-time interface. And you can even avoid
that if you use the RTnet proxy.

> Do I have to load the rt version of my network card
> driver?

Well, yes, obviously. As well as the rtnet, rtipv4 and rtudp
modules.

-- 
					    Gilles.
https://click-hack.org


^ permalink raw reply	[flat|nested] 4+ messages in thread

end of thread, other threads:[~2015-08-29 17:21 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
     [not found] <8655AC8285F53F42A4B1B3CAB3092C47235FC2D7@IVKEX2.fkfs.de>
     [not found] ` <8655AC8285F53F42A4B1B3CAB3092C47235FD2F2@IVKEX2.fkfs.de>
2015-08-29 15:23   ` [Xenomai] Question about priority coupling in primary and secondary mode Rothermel, Thomas
2015-08-29 15:46     ` Gilles Chanteperdrix
2015-08-29 16:12       ` Rothermel, Thomas
2015-08-29 17:21         ` Gilles Chanteperdrix

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.