mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: Hillf Danton <hdanton@sina.com>
To: Hauke Mehrtens <hauke@hauke-m.de>
Cc: David Laight <david.laight.linux@gmail.com>,
	Jiri Slaby <jirislaby@kernel.org>,
	linux-kernel@vger.kernel.org, Tejun Heo <tj@kernel.org>
Subject: Re: [PATCH v2] kernel/fork: Increase minimum number of allowed threads
Date: Tue, 22 Jul 2025 06:56:40 +0800	[thread overview]
Message-ID: <20250721225641.2691-1-hdanton@sina.com> (raw)
In-Reply-To: <20250721192830.6f8f57d9@pumpkin>

On Sun, 20 Jul 2025 17:28:20 +0200 Hauke Mehrtens wrote:
> Hi,
> 
> I am not exactly sure how I should limit the number of parallel user 
> mode helper calls.
> The user mode helper is calling wait_for_initramfs() so it could be that 
> some calls are getting queued at the early bootup. This is probably the 
> problem I am hitting.
> 
> I do not want to block the device creation till the user mode helper 
> finished. This could also result in a deadlock and would probably slow 
> down bootup.
> 
> When I limit the number of user mode helper calls to 1 and let the 
> others wait in a system queue, I might block other unrelated tasks in 
> the system queue.
> 
Can you specify how system queue is blocked, after a look at the false
deadlock [1]?

[1] https://lore.kernel.org/lkml/20240927112516.1136-1-hdanton@sina.com/

> I would create an own queue and let the async user mode helper wait in 
> this queue to only execute one at a time. When one of them needs a long 
> time in user space it would block the others. This workqueue would also 
> be active all the time. After the bootup it would probably not do much 
> work any more.
> 
> I do not like any of these solutions. Do you have better ideas?

      reply	other threads:[~2025-07-21 22:57 UTC|newest]

Thread overview: 8+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2025-07-11 23:08 Hauke Mehrtens
2025-07-12  6:50 ` Greg KH
2025-07-17  5:26 ` Jiri Slaby
2025-07-17 21:34   ` David Laight
2025-07-17 22:52     ` Hauke Mehrtens
2025-07-20 15:28       ` Hauke Mehrtens
2025-07-21 18:28         ` David Laight
2025-07-21 22:56           ` Hillf Danton [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=20250721225641.2691-1-hdanton@sina.com \
    --to=hdanton@sina.com \
    --cc=david.laight.linux@gmail.com \
    --cc=hauke@hauke-m.de \
    --cc=jirislaby@kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=tj@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

all inboxes | Powered by JetHome®