linux-serial.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH] serial: imx: reduce RX interrupt frequency
@ 2022-01-04 10:32 Tomasz Moń
  2022-01-04 10:43 ` Ahmad Fatoum
  2022-01-04 10:54 ` Greg Kroah-Hartman
  0 siblings, 2 replies; 21+ messages in thread
From: Tomasz Moń @ 2022-01-04 10:32 UTC (permalink / raw)
  To: linux-serial
  Cc: Greg Kroah-Hartman, Jiri Slaby, Shawn Guo, Sascha Hauer,
	Pengutronix Kernel Team, Fabio Estevam, NXP Linux Team,
	k.drobinski, Tomasz Moń

Triggering RX interrupt for every byte defeats the purpose of aging
timer and leads to interrupt starvation at high baud rates.

Increase receiver trigger level to 8 to increase the minimum period
between RX interrupts to 8 characters time. The tradeoff is increased
latency. In the worst case scenario, where RX data has intercharacter
delay slightly less than aging timer (8 characters time), it can take
up to 63 characters time for the interrupt to be raised since the
reception of the first character.

Signed-off-by: Tomasz Moń <tomasz.mon@camlingroup.com>
---
 drivers/tty/serial/imx.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/drivers/tty/serial/imx.c b/drivers/tty/serial/imx.c
index 90f82e6c54e4..3c812c47ecc0 100644
--- a/drivers/tty/serial/imx.c
+++ b/drivers/tty/serial/imx.c
@@ -1255,7 +1255,7 @@ static void imx_uart_clear_rx_errors(struct imx_port *sport)
 }
 
 #define TXTL_DEFAULT 2 /* reset default */
-#define RXTL_DEFAULT 1 /* reset default */
+#define RXTL_DEFAULT 8 /* 8 characters or aging timer */
 #define TXTL_DMA 8 /* DMA burst setting */
 #define RXTL_DMA 9 /* DMA burst setting */
 
-- 
2.25.1


^ permalink raw reply related	[flat|nested] 21+ messages in thread

end of thread, other threads:[~2022-01-10  8:33 UTC | newest]

Thread overview: 21+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2022-01-04 10:32 [PATCH] serial: imx: reduce RX interrupt frequency Tomasz Moń
2022-01-04 10:43 ` Ahmad Fatoum
2022-01-04 11:05   ` Tomasz Moń
2022-01-04 10:54 ` Greg Kroah-Hartman
2022-01-04 11:13   ` Tomasz Moń
2022-01-04 11:38     ` Greg Kroah-Hartman
2022-01-04 22:49       ` Uwe Kleine-König
2022-01-05  7:59         ` Tomasz Moń
2022-01-05 10:37           ` Greg Kroah-Hartman
2022-01-05 10:56             ` Tomasz Moń
2022-01-05 10:57             ` Marc Kleine-Budde
2022-01-06 15:39               ` Sergey Organov
2022-01-05 13:34         ` Sergey Organov
2022-01-06 15:05           ` Uwe Kleine-König
2022-01-10  6:14             ` Tomasz Moń
2022-01-10  8:31               ` Uwe Kleine-König
2022-01-05 13:00   ` Sergey Organov
2022-01-05 13:04     ` Marc Kleine-Budde
2022-01-05 13:37       ` Sergey Organov
2022-01-05 13:40         ` Marc Kleine-Budde
2022-01-05 14:37           ` Sergey Organov

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).