Re: [PATCH v4] tty: tty_port: add workqueue to flip tty buffer
From: Tejun Heo
Date: Tue Dec 02 2025 - 00:43:03 EST
Hello,
On Sat, Nov 29, 2025 at 02:10:48AM +0800, Xin Zhao wrote:
> + if (!(driver->flags & TTY_DRIVER_CUSTOM_WORKQUEUE)) {
> + driver->flip_wq = alloc_workqueue("%s-flip-wq",
> + WQ_UNBOUND | WQ_SYSFS,
> + 0, driver->name);
> + if (!driver->flip_wq) {
> + error = -ENOMEM;
> + goto err_unreg_char;
> + }
> + for (i = 0; i < driver->num; i++) {
> + if (driver->ports[i] && !driver->ports[i]->buf.flip_wq)
> + tty_port_link_driver_wq(driver->ports[i], driver);
> + }
> + }
Maybe it's just me not understanding the requirement but does this need to
be this complicated? It was just using system_unbound_wq before. Can we
start with something very simple - ie. one custom workqueue which is shared
across devices? Wouldn't that work?
Thanks.
--
tejun