Re: [PATCH v8] tty: tty_port: add workqueue to flip TTY buffer

From: Greg KH

Date: Fri Jan 16 2026 - 08:24:25 EST


On Tue, Dec 30, 2025 at 05:03:41PM +0800, Xin Zhao wrote:
> Hi all,
>
> On Tue, 23 Dec 2025 11:48:36 +0800 Xin Zhao <jackzxcui1989@xxxxxxx> wrote:
> > On the embedded platform, certain critical data, such as IMU data, is
> > transmitted through UART. The tty_flip_buffer_push() interface in the TTY
> > layer uses system_dfl_wq to handle the flipping of the TTY buffer.
> > Although the unbound workqueue can create new threads on demand and wake
> > up the kworker thread on an idle CPU, it may be preempted by real-time
> > tasks or other high-prio tasks.
> >
> > flush_to_ldisc() needs to wake up the relevant data handle thread. When
> > executing __wake_up_common_lock(), it calls spin_lock_irqsave(), which
> > does not disable preemption but disables migration in RT-Linux. This
> > prevents the kworker thread from being migrated to other cores by CPU's
> > balancing logic, resulting in long delays. The call trace is as follows:
> >
> > ...
>
>
> Are there any other changes needed before the patch is merged?
>
> Jiri has reviewed the patch, and I have made the modifications. :)

I need Jiri to ack it :)

thanks,

greg k-h