[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Message-ID: <aScs3LZ9nAIHCPzk@slm.duckdns.org>
Date: Wed, 26 Nov 2025 06:37:48 -1000
From: Tejun Heo <tj@...nel.org>
To: Xin Zhao <jackzxcui1989@....com>
Cc: gregkh@...uxfoundation.org, hch@...radead.org, jirislaby@...nel.org,
linux-kernel@...r.kernel.org, linux-serial@...r.kernel.org
Subject: Re: [PATCH v3] tty: tty_port: add workqueue to flip tty buffer
On Wed, Nov 26, 2025 at 10:46:50PM +0800, Xin Zhao wrote:
> On Wed, 26 Nov 2025 13:10:49 +0100 Greg KH <gregkh@...uxfoundation.org> wrote:
>
> > I don't know, what have you found in your testing? Will multiple
> > workqueues cause too much overhead for large multi-port systems (i.e.
> > modem banks?)
> >
> > Perhaps start with just a single workqueue and then increase it if there
> > is contention later if people notice?
>
> OK. I will allocate single workqueue of one tty_driver in v4, simplifying
> the logic for creating and releasing the workqueue.
Note that having multiple workqueues doesn't necessarily mean there will be
more threads. If you have 10 workqueues with @max_active of 1, you'd get the
same concurrency as a single workqueue with @max_active of 10. Each
workqueue is more of a property domain than actual thread pool. I don't
think you'd gain anything by creating a separate workqueue per device.
Thanks.
--
tejun
Powered by blists - more mailing lists