public inbox for linux-serial@vger.kernel.org
 help / color / mirror / Atom feed
From: Tejun Heo <tj@kernel.org>
To: Xin Zhao <jackzxcui1989@163.com>
Cc: gregkh@linuxfoundation.org, hch@infradead.org,
	jirislaby@kernel.org, linux-kernel@vger.kernel.org,
	linux-serial@vger.kernel.org
Subject: Re: [PATCH v3] tty: tty_port: add workqueue to flip tty buffer
Date: Wed, 26 Nov 2025 06:37:48 -1000	[thread overview]
Message-ID: <aScs3LZ9nAIHCPzk@slm.duckdns.org> (raw)
In-Reply-To: <20251126144650.2799567-1-jackzxcui1989@163.com>

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@linuxfoundation.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

      reply	other threads:[~2025-11-26 16:37 UTC|newest]

Thread overview: 8+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2025-10-27  6:09 [PATCH v3] tty: tty_port: add workqueue to flip tty buffer Xin Zhao
2025-11-24  5:17 ` Xin Zhao
2025-11-24 16:02   ` Tejun Heo
2025-11-24 16:02     ` Tejun Heo
2025-11-25  2:19     ` Xin Zhao
2025-11-26 12:10       ` Greg KH
2025-11-26 14:46         ` Xin Zhao
2025-11-26 16:37           ` Tejun Heo [this message]

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=aScs3LZ9nAIHCPzk@slm.duckdns.org \
    --to=tj@kernel.org \
    --cc=gregkh@linuxfoundation.org \
    --cc=hch@infradead.org \
    --cc=jackzxcui1989@163.com \
    --cc=jirislaby@kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-serial@vger.kernel.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox