Re: serial: sh-sci: rx overrun errors and hrtimer rx_timeout?

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

 



On 19.08.2024 21:26, Geert Uytterhoeven wrote:
Hi Dirk,

On Fri, Aug 9, 2024 at 9:27=E2=80=AFAM Dirk Behme <dirk.behme@xxxxxxxxxxxx>=
  wrote:
short: What is the sh-sci rx DMA hrtimer configured to rx_timeout good fo=
r?

Long story:

Using drivers/tty/serial/sh-sci.c (on 4.14.x Renesas BSP) what is quite
similar to [1] we got reports about data loss on rx large files (test
case rx 1GB file):

[...]

I'll answer the short question ;-)

When RX DMA is enabled, data is received in the RX FIFO.  Only when
the FIFO is full, an interrupt is raised, and the data is received by
Linux, and passed to the next layer.

So what happens if less data is received than the FIFO size?
In that case, the data would be stuck in the FIFO, as no interrupt
is raised.  Hence a hrtimer is used to make sure Linux receives data
from a partially-filled FIFO when no more data arrives soon (within
rx_timeout =C2=B5s).

I hope this helps to understand the problem you are seeing.

Yes, many thanks! :)

Just fyi, we are currently investigating two issues we are unsure about:

* It looks like the hrtimer is set to *exactly* the time the data would need to fill the DMA buffer (?). So if the hrtimer is started *before* the DMA, does the DMA have a chance to finish successfully at all? Need to check that with some traces ...

* Due to high system load it seems the hrtimer handler and/or the DMA complete callback are delayed. What might explain the overrun errors. Need to check this as well ...

Again many thanks for helping,

Dirk





[Index of Archives]     [Linux Samsung SOC]     [Linux Wireless]     [Linux Kernel]     [ATH6KL]     [Linux Bluetooth]     [Linux Netdev]     [Kernel Newbies]     [IDE]     [Security]     [Git]     [Netfilter]     [Bugtraq]     [Yosemite News]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Linux ATA RAID]     [Samba]     [Device Mapper]

  Powered by Linux