[Xenomai] context switch minimize

Philippe Gerum rpm at xenomai.org
Thu Jul 5 16:14:17 CEST 2018


On 07/05/2018 04:08 PM, Johann Obermayr wrote:
> 
> 
>> -----Ursprüngliche Nachricht-----
>> Von: Xenomai [mailto:xenomai-bounces at xenomai.org] Im Auftrag von
>> Philippe Gerum
>> Gesendet: Donnerstag, 5. Juli 2018 15:05
>> An: jimmyo <jimmyo at gmx.at>; xenomai at xenomai.org
>> Betreff: Re: [Xenomai] context switch minimize
>>
>> On 07/05/2018 11:37 AM, jimmyo wrote:
>>> Hello,
>>>
>>> we have a running system on mx6 with Kernel 3.10.x and Xenomai 2.6.4.
>>> i known, it's very old.
>>> now we have to make some optmization.
>>> In one xenomai task we need to check, if a TCP/UDP socket handle has
>>> data to receive.
>>> at this time we use select to detect if there are data available and
>>> with ioctl & FIONREAD we get count of data.
>>>
>>> Now we must search a way, to do this in the primary domain, without
>>> switching to secondary domain.
>>>
>>> Is there a way to solve it ?
>>>
>>> we have a exists rtdm interface to a own kernel module.
>>> And we use rt_dev_ioctl to communicate with this module.
>>>
>>
>> A plain thread could select() these file descriptors in userland, posting a
>> Xenomai-managed semaphore which your rt thread would trywait() on.
>>
>> - semaphores can be posted by any thread, including those unknown to
>> Xenomai
>> - sem_trywait() would poll for the event without switching mode.
>>
>> --
>> Philippe.
>>
>> _______________________________________________
>> Xenomai mailing list
>> Xenomai at xenomai.org
>> https://xenomai.org/mailman/listinfo/xenomai
> 
> Hello,
> 
> We also thought about our own thread but wanted to know if there is a better solution.
> 

None that would be as simple.

-- 
Philippe.



More information about the Xenomai mailing list