Re: response time of serdev_device

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Fri, Jan 28, 2022 at 01:03:53PM +0000, Benjamin Ulrich wrote:
> Hi all,
> 
> I'm using your serdev_device kernel module because it fit my needs pretty well.
> In my application the response delay to an received frame is time critical, because of that I made following observations:
> 
> When I'm writing an UART "echo-device" with:
> static int device_receive_buf(struct serdev_device *serdev, const unsigned char *pbuf, size_t length)
> {
>     return serdev_device_write_buf(serdev, pbuf, length);
> }
> 
> I can measure the response delay between the TX/RX UART line.
> On my device (IMX8,with preempt-rt) the delay is dependent from the baudrate:
> 19200b -> 4.6ms
> 115200 -> 1ms
> 256000 -> 0.7ms
> 
> The result is very surprising to me, at least the baudrate-response dependency.

This all depends on your uart hardware as well.

> I know that there are HW-Flow control stuff for Half-Duplex communication like in many RS485 applications. 
> Is it possible that there are some old configs left? In the function: static int ttyport_open(struct serdev_controller *ctrl) the ktermios flags are set properly.
> 
> For my driver a response time of 1ms@19200 would be really good.

Why do you think that?

> Can someone help me to archive that?

Are you sure this is possible with your hardware?  This depends on your
workload and lots of other things happening at the same time.  If you
need determinisitic behavior, have you tried the -RT kernel?

Have you used perf to measure where the delay is happening?

thanks,

greg k-h



[Index of Archives]     [Kernel Newbies]     [Security]     [Netfilter]     [Bugtraq]     [Linux PPP]     [Linux FS]     [Yosemite News]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Samba]     [Video 4 Linux]     [Linmodem]     [Device Mapper]     [Linux Kernel for ARM]

  Powered by Linux