[etherlab-users] How can I reduce latency of cyclic task with etherlab master?

Andreas Stewering-Bone ab at igh-essen.com
Tue Nov 1 17:09:38 CET 2011


Hello,


Am 31.10.2011 12:15, schrieb Donggu Kang:
> Hello,
>
> Sorry, I didn't attache system information.
> Processor : Core2 Duo L7400 1.5Ghz
> Task Cycle: 1ms
> Real-Time : Xenomai 2.5.6, iadeos-ipipe-2.6.37-x86-2.9-02
> Linux     : Debian squeeze , kernel-2.6.37.6
> Etherlab : 1.5-stable
>
>    
looks good, which driver do you use?
e100, 8139too, generic?

I think your latency should be about 7us.
Do you check SMI?
> I did use Beckhoff I/O Module EL2088 with EK1100 Ethercat coupler.
> In my xenomai reat-time task, I only turned output ON and OFF at every cycle.
> And I measured a period of the output signal of I/O module using 1Ghz
> Oscilloscope.
> I also read CPU TSC value.
>
> I know the period value have lots of factors, task execution time,
> network latency,
> ESC response time, and so on.
>
> Xenomai guys said "when a real-time task runs in primary mode, it can
> not be interrupted by
> any Linux interrupt. However, a real-time task using linux services
> (such as linux network services), it will switch to secondary mode, and
> a linux irq will be able to interrupt it. "
>
>    
Yes this is correct.

> EtherLab master is working as kernel module, isn't it?.
> So I think if xenomai gays says correct, when real time task call the
> etherlab api, the mode is changed to secondary mode,
> and hardware irq could be able to interrupt it.
>
>    
No, that is not possible. Let me explain.
The etherlab master is a kernel module but for the realtime task it is 
only a summary of functional code. In realtime the etherlab master does 
not use kernel infrastructure. So your task will run only in primary mode.

But if you use the generic driver you use kernel infrastructure, so your 
task will switch in secondary mode.

Using the native driver e100, 8139too,... will run in primary mode.


Best regards

Andreas
> For more reduced latency, how can I do?
>
> Best regards
>
> Donggu
>
>
>
> 2011/10/24 Andreas Stewering-Bone<ab at igh-essen.com>:
>    
>> Hello,
>>
>> first, the use of etherlab should not touch your system latency,
>>
>> Which processor do you use?
>>
>> How do you measure the latency? RTAI-Testsuite?
>>
>> What are your etherlab task cyclic time?
>>
>> What execution time does your software have?
>>
>> On older system with high hd load you can switch of dma.
>>
>> Best regards
>>
>> Andreas
>>
>> Am 21.10.2011 06:48, schrieb Donggu Kang:
>>      
>>> Hi,
>>>
>>> I'm newbe in ethercat and real-time world.
>>>
>>> I installed etherlab master(1.5-stable) with xenomai environment on my
>>> linux box.
>>> And I tried to latency test of real-time task with etherlab master API.
>>> I also did it without a ehterlab master API.
>>> A stress is "while true;do ls -lR />    /tmp/list; done&    >    /dev/null"
>>> shell script;
>>> It's called repeatedly by bash shell script and making hard disk load.
>>>
>>> When I use etherlab API, the latest latency of cyclic task is above a
>>> 500us.
>>> But when I don't use etherlab API, latency is about "70us".
>>>
>>> According test result, etherlab API or EtherCAT-capable network device
>>> is interrupted by hard disk access on my system.
>>> I think hard disk access is making a huge latency.
>>> And other devices also also become a source of latency on my system.
>>>
>>> If anyone has any advice could you please leave your comment?
>>>
>>>
>>> Best regards.
>>>
>>> Donggu Kang.
>>> _______________________________________________
>>> etherlab-users mailing list
>>> etherlab-users at etherlab.org
>>> http://lists.etherlab.org/mailman/listinfo/etherlab-users
>>>
>>>        
>>
>> Mit freundlichem Gruß
>>
>> Andreas Stewering-Bone
>>
>> --
>> ------------------------------------------------------------------------
>>
>> Dipl.-Ing.(FH) Andreas Stewering-Bone
>> andreas.stewering-bone at igh-essen.com
>> Tel.: +49 201 / 36014-15
>>
>> Ingenieurgemeinschaft IgH
>> Gesellschaft für Ingenieurleistungen mbH
>> Heinz-Bäcker-Str. 34
>> D-45356 Essen
>> Amtsgericht Essen HRB 11500
>> USt-Id.-Nr.: DE 174 626 722
>> Geschäftsführung:
>> - Dr.-Ing. S. Rotthäuser,
>> - Dr.-Ing. T. Finke,
>> - Dr.-Ing. W. Hagemeister
>> Tel.: +49 201 / 360-14-0
>> http://www.igh-essen.com
>>
>> ------------------------------------------------------------------------
>>
>> _______________________________________________
>> etherlab-users mailing list
>> etherlab-users at etherlab.org
>> http://lists.etherlab.org/mailman/listinfo/etherlab-users
>>
>>      


Mit freundlichem Gruß

Andreas Stewering-Bone

-- 
------------------------------------------------------------------------

Dipl.-Ing.(FH) Andreas Stewering-Bone
andreas.stewering-bone at igh-essen.com
Tel.: +49 201 / 36014-15

Ingenieurgemeinschaft IgH
Gesellschaft für Ingenieurleistungen mbH
Heinz-Bäcker-Str. 34
D-45356 Essen
Amtsgericht Essen HRB 11500
USt-Id.-Nr.: DE 174 626 722
Geschäftsführung:
- Dr.-Ing. S. Rotthäuser,
- Dr.-Ing. T. Finke,
- Dr.-Ing. W. Hagemeister
Tel.: +49 201 / 360-14-0
http://www.igh-essen.com

------------------------------------------------------------------------




More information about the Etherlab-users mailing list