On 03/20/2018 12:31 PM, Pintu Kumar wrote:
> On Tue, Mar 20, 2018 at 3:02 PM, Philippe Gerum <[email protected]> wrote:
>> On 03/20/2018 08:26 AM, Pintu Kumar wrote:
>>> On Tue, Mar 20, 2018 at 10:57 AM, Pintu Kumar <[email protected]> wrote:
>>>> On Tue, Mar 20, 2018 at 9:03 AM, Greg Gallagher <[email protected]> 
>>>> wrote:
>>>>> If you want to use open, read, write you need to specify in the
>>>>> makefile to use the posix skin.  You need something like these in your
>>>>> Makefile:
>>>>>
>>>>> XENO_CONFIG := /usr/xenomai/bin/xeno-config
>>>>> CFLAGS := $(shell $(XENO_CONFIG) --posix --cflags)
>>>>> LDFLAGS := $(shell  $(XENO_CONFIG) --posix --ldflags)
>>>>>
>>>>
>>>> Oh yes I forgot to mention with posix skin it is working.
>>>>
>>>> But I wanted to use native API only, so I removed posix skin from Makefile.
>>>>
>>>> For, native API, I am using: rt_dev_{open, read, write}. Is this the
>>>> valid API for Xenomai 3.0 ?
>>>> Or there is something else?
>>>> Is there any reference ?
>>>>
>>>
>>> Dear Greg,
>>>
>>> In my sample, I am just copying some string from user <--> kernel and
>>> printing them.
>>> For normal driver, I get read/write latency like this:
>>> write latency: 2.247 us
>>> read latency: 2.202 us
>>>
>>> For Xenomai 3.0 rtdm driver, using : rt_dev_{open, read, write}
>>> I get the latency like this:
>>> write latency: 7.668 us
>>> read latency: 5.558 us
>>>
>>> My concern is, why the latency is higher in case of RTDM ?
>>> This is on x86-64 machine.
>>>
>>
>> Did you stress your machine while your test was running? If not, you
>> were not measuring worst-case latency, you were measuring execution time
>> in this case, which is different. If you want to actually measure
>> latency for real-time usage, you need to run your tests under
>> significant stress load. Under such load, the RTDM version should
>> perform reliably below a reasonable latency limit, the "normal" version
>> will experience jittery above that limit.
>>
>> A trivial stress load may be as simple as running a dd loop copying
>> 128Mb blocks from /dev/zero to /dev/null in the background, you may also
>> add a kernel compilation keeping all CPUs busy.
>>
> 
> OK, I tried both the option. But still normal driver latency is much lower.
> In fact, with kernel build in another terminal, rtdm latency shoots much 
> higher.
> Normal Kernel
> --------------------
> write latency: 3.084 us
> read latency: 3.186 us
> 
> RTDM Kernel (native)
> ---------------------------------
> write latency: 12.676 us
> read latency: 9.858 us
> 
> RTDM Kernel (posix)
> ---------------------------------
> write latency: 12.907 us
> read latency: 8.699 us
> 
> During the beginning of kernel build I even observed, RTDM (native)
> goes as high as:
> write latency: 4061.266 us
> read latency: 3947.836 us

Just to make sure, we are actually discussing a test case on real
hardware, not VM stuff, right?

-- 
Philippe.

_______________________________________________
Xenomai mailing list
[email protected]
https://xenomai.org/mailman/listinfo/xenomai

Reply via email to