On 02/12/2013 01:33 PM, Zemskov, Evgeny wrote:
> Good evening !
>
> We're developing a system with bunch of Xenomai threads, one of which writes
> the data to some specific device (MIL-STD-1553B bus controller).
>
> RTDM drivers for this device are not available, and we want to avoid porting
> them to RTDM.
> Since we don't need to wait for any interrupts from this device (we init the
> transmission with some ioctl's which write to the registers of the device and
> write the data being tarnsmitted with __copy_from_user), we've tried to use
> standard Linux drived from Xenomai thread.
> Naturally, on each transmission, the transmitting Xenomai thread switches to
> the secondary mode, but the resulting latency is perfectly OK for us (we
> estimate it at around 50..100 usec).
You probably should not expect a bounded latency from Linux.
>
> Would such approach cause extra latencies to other Xenomai threads, which run
> simultaneously in primary mode ?
If you enable CONFIG_XENO_OPT_PRIOCPL and the task running in secondary
mode has a higher priority than other Xenomai threads, then yes.
Otherwise no.
> Also, would there be any problems with constant switches of our writer thread
> between primary and secondary mode ?
It depends on your definition of "problems":
- such a task can not be considered a real-time task
- and the constant switches induces a bit of CPU consumption.
> As far as I understand, on each register access it is switched to secondary
> mode, and on each rt_cond_wait it goes back to primary mode.
You understand right.
--
Gilles.
_______________________________________________
Xenomai mailing list
[email protected]
http://www.xenomai.org/mailman/listinfo/xenomai