lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Message-Id: <20251204190123.1541283-1-jackzxcui1989@163.com>
Date: Fri,  5 Dec 2025 03:01:23 +0800
From: Xin Zhao <jackzxcui1989@....com>
To: tj@...nel.org
Cc: gregkh@...uxfoundation.org,
	hch@...radead.org,
	jackzxcui1989@....com,
	jirislaby@...nel.org,
	linux-kernel@...r.kernel.org,
	linux-serial@...r.kernel.org
Subject: Re: [PATCH v4] tty: tty_port: add workqueue to flip tty buffer

Dear tejun,
    Sorry for reply late, working on another urgent task recently.

On Mon, 1 Dec 2025 19:42:55 -1000 Tejun Heo <tj@...nel.org> wrote:

> 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?

Are you suggesting that all tty ports in all tty drivers/devices use the same
workqueue? This would prevent me from individually setting the CPU affinity
attributes of ttyS's flip buffer, as it would affect other flip buffer like pty.
In our project, we do not want to modify the work affinity attributes of pty's
flip buffer, as it is not critical and should not be treated specially (being
placed on CPUs with relatively fewer real-time tasks or having its priority
increased).
More broadly, if a system has multiple tty devices, different tty devices may be
running unrelated workloads bound to different CPU groups, it is more reasonable
to allow the flip buffer work related to the relevant CPUs, rather than putting
them all into a single workqueue.


--
Xin Zhao


Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ