Use kthread workers to enable low-latency tty support

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

 



At one point there was a flag in the tty_port structure (low_latency) that, if
set, would push data to the tty ldisc immediately from hardirq context, instead
of from the workqueue.  That low latency support has not worked for some time,
though the low_latency flag remains.

Lacking any low latency mechanism for UART drivers makes their use in embedded
systems with real-time threads tricky.  Since workqueues run as a normal
priority process, they can be easily starved by medium priority real-time
threads, even when a higher-priority thread is waiting to read from the UART.

This patch set provides a solution by deferring tty work to a kthread worker,
instead of a workqueue.  kthread workers run on dedicated kernel threads that
can have a custom priority.  Now, when port->low_latency is set, flush_to_ldisc
will run on a dedicated real-time thread.  The priority of that kernel thread
can be changed at run-time so that real-time threads that read from the UART
cannot be starved.
--
To unsubscribe from this list: send the line "unsubscribe linux-serial" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html




[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