[Rtai] Newbie questions
mantegazza at aero.polimi.it
mantegazza at aero.polimi.it
Thu Mar 17 11:25:12 CET 2011
>
>> > ...
>> >
>> > 2) The socket communications are somewhat slower than I hoped for.
>> > I'm only managing 4 to 5 requests per cycle (with thread 1 only taking
>> > up 3% of its time). When thread 1 is loaded up to 50% (with a busy
>> > wait) then it can only process 1 or 2 requests per cycle. I have
>> tried
>> > a couple the optimizations recommended here
>> > (http://www.ibm.com/developerworks/linux/library/l-hisock.html) with
>> > little effect. I am currently only disabling nagle, though I did try
>> > the other suggestions without having much effect (but also not really
>> > knowing which values to try).
>> >
>> > ...
>>
>>
>> Maybe want to look into RTnet? http://www.rtnet.org/
>>
>> Chris
>
>
> Hi,
>
> Thanks for the link. Looking at it I don't think it will help in my case.
> What I have is:
>
> LAN
> |
> +---------------+-----------------+
> | GUI for motion control system |
> | Windows PC |
> +---------------+-----------------+
> |
> |
> +---------------+-----------------+
> | New motion controller |
> | Linux / RTAI / ethercat PC |
> +---------------+-----------------+
> |
> EtherCat fieldbus
>
>
> So my new linux / RTAI pc has two NIC's, one is dedicated to the EtherCat
> fieldbus using the ethercat network card driver and the other NIC needs to
> accept socket commands from a windows based application.
>
> Although the link between the windows PC and the Linux PC will be
> dedicated, from what I can see from the RTnet documentation there will be
> no point using RTnet because windows will only be able to interact using
> non-realtime communications anyway. (Please correct me if I'm wrong.)
>
> Also, the windows PC does not require deterministic messaging to the Linux
> PC. All it needs is a high throughput (I'm hoping for about 10-20
> commands per ms) and the assurance that handling the communications does
> not kill the hard realtime performance.
>
>
> I've been playing with my system a bit. I've disabled all sockets code so
> now I only have a hard realtime thread writing statistical data to sheared
> memory (similar to latency check code) and a soft realtime thread waiting
> on a semaphore that is released by the first (hrt) thread at the end of
> its cycle so that it can read the data and printf it.
>
> I'm still getting overruns. So here are a couple of questions:
>
> 1) Am I correct that to be able to use rt functions I need to call
> rt_task_init for a thread (and it becomes soft realtime)?
>
Yes. Better toi use the newest rt_thread_init, which allows you to set nay
sched type linux option.
> 2) Am I correct that with the Fifo scheduler rt threads (both soft and
> hard realtime) will not be pre-empted by other rt threads?
With the RTAI fifo schedule all of Linux threads will be preempted by RTAI
owned threads, Preemption of hard real time threads will be governed
according to their RTAI priorities.
>
> 3) Should I be using an async server (from README.LINUX_SERVER) even for
> soft realtime rt threads?
It makes no sense.
>
> 4) I've enabled the rtai_smi module just in case, but it doesn't make any
> difference. I have an Intel® Celeron® M ULV, 1 GHz cpu. As far as I can
> tell it uses SMI. Does anyone know if I should be using the rtai_smi
> module with this cpu?
>
If it is active you should disable what of it can lock you system.
paolo
>
> Thanks,
> Graeme.
>
>
> _______________________________________________
> Rtai mailing list
> Rtai at rtai.org
> https://mail.rtai.org/cgi-bin/mailman/listinfo/rtai
>
More information about the Rtai
mailing list