linux-doc.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Tejun Heo <tj@kernel.org>
To: ying chen <yc1082463@gmail.com>
Cc: corbet@lwn.net, jiangshanlai@gmail.com,
	linux-doc@vger.kernel.org, linux-kernel@vger.kernel.org,
	laoar.shao@gmail.com
Subject: Re: [PATCH] workqueue: add workqueue.mayday_initial_timeout
Date: Tue, 11 Nov 2025 10:40:36 -1000	[thread overview]
Message-ID: <aROfRBGmglPgcPVf@slm.duckdns.org> (raw)
In-Reply-To: <CAN2Y7hwttMyUn0qsEcSBbrQ1h+aSzNpHMhgAxEbqJZn4vf5hBw@mail.gmail.com>

Hello,

On Tue, Nov 11, 2025 at 10:52:44AM +0800, ying chen wrote:
> If creating a new worker takes longer than MAYDAY_INITIAL_TIMEOUT,
> the rescuer thread will be woken up to process works scheduled on
> @pool, resulting in sequential execution of all works. This may lead
> to a situation where one work blocks others. However, the initial
> rescue timeout defaults to 10 milliseconds, which can easily be
> triggered in heavy-load environments.

This is not how workqueue works. Rescuer doesn't exclude other workers. If
other workers become available, they will run the workqueue concurrently.
All that initial timeout achieves is delaying the initial execution from the
rescuer.

Is this from observing real behaviors? If so, what was the test case and how
did the behavior after the patch? It couldn't have gotten better.

Thanks.

-- 
tejun

  parent reply	other threads:[~2025-11-11 20:40 UTC|newest]

Thread overview: 10+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2025-11-11  2:52 [PATCH] workqueue: add workqueue.mayday_initial_timeout ying chen
2025-11-11  2:55 ` Matthew Wilcox
2025-11-11  7:19   ` ying chen
2025-11-11  8:00   ` Lai Jiangshan
2025-11-11 20:40 ` Tejun Heo [this message]
2025-11-12  2:01   ` ying chen
2025-11-12 16:03     ` Tejun Heo
2025-11-13  2:34       ` ying chen
2025-11-13 16:31         ` Tejun Heo
2025-11-13 15:50       ` Lai Jiangshan

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=aROfRBGmglPgcPVf@slm.duckdns.org \
    --to=tj@kernel.org \
    --cc=corbet@lwn.net \
    --cc=jiangshanlai@gmail.com \
    --cc=laoar.shao@gmail.com \
    --cc=linux-doc@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=yc1082463@gmail.com \
    /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;
as well as URLs for NNTP newsgroup(s).