From: "Danilo Krummrich" <dakr@kernel.org>
To: "Bart Van Assche" <bvanassche@acm.org>
Cc: "Greg Kroah-Hartman" <gregkh@linuxfoundation.org>,
"Rafael J . Wysocki" <rafael@kernel.org>,
<driver-core@lists.linux.dev>,
"Luis Chamberlain" <mcgrof@kernel.org>,
"Petr Pavlu" <petr.pavlu@suse.com>,
"Daniel Gomez" <da.gomez@kernel.org>,
"Sami Tolvanen" <samitolvanen@google.com>,
"Aaron Tomlin" <atomlin@atomlin.com>,
"Igor Pylypiv" <ipylypiv@google.com>,
"Chung-Kai Mei" <chungkai@google.com>, <stable@vger.kernel.org>
Subject: Re: [PATCH] drivers: base: Set mod->async_probe_requested if needed
Date: Tue, 28 Apr 2026 20:22:49 +0200 [thread overview]
Message-ID: <DI4ZX1HOWDNH.3G36YTI0MYC76@kernel.org> (raw)
In-Reply-To: <20260407160511.56289-1-bvanassche@acm.org>
On Tue Apr 7, 2026 at 6:05 PM CEST, Bart Van Assche wrote:
> If PROBE_PREFER_ASYNCHRONOUS is set for a device driver, and if loading
> other kernel modules depends on probing of that device driver to
> complete, e.g. because it is a storage driver, and if
> mod->async_probe_requested has not been set, then the
> async_synchronize_full() call in do_init_module() introduces a delay.
> Fix this by setting mod->async_probe_requested if
> PROBE_PREFER_ASYNCHRONOUS has been set. This patch reduces the Pixel 10
> boot time by 100 ms.
>
> Cc: Luis Chamberlain <mcgrof@kernel.org>
> Cc: Petr Pavlu <petr.pavlu@suse.com>
> Cc: Daniel Gomez <da.gomez@kernel.org>
> Cc: Sami Tolvanen <samitolvanen@google.com>
> Cc: Aaron Tomlin <atomlin@atomlin.com>
> Cc: Igor Pylypiv <ipylypiv@google.com>
> Cc: Chung-Kai Mei <chungkai@google.com>
> Cc: stable@vger.kernel.org
Why does this have Cc: stable? I think this is just an improvement and not a
regression? If it is a regression, what's the commit that is fixed?
> Signed-off-by: Bart Van Assche <bvanassche@acm.org>
> ---
> drivers/base/module.c | 3 +++
> 1 file changed, 3 insertions(+)
>
> diff --git a/drivers/base/module.c b/drivers/base/module.c
> index 218aaa096455..e58fc189d389 100644
> --- a/drivers/base/module.c
> +++ b/drivers/base/module.c
> @@ -39,6 +39,9 @@ int module_add_driver(struct module *mod, const struct device_driver *drv)
> if (!drv)
> return 0;
>
> + if (mod && drv->probe_type == PROBE_PREFER_ASYNCHRONOUS)
> + mod->async_probe_requested = true;
What if userspace did explicitly pass async_probe=0?
> +
> if (mod)
> mk = &mod->mkobj;
> else if (drv->mod_name) {
next prev parent reply other threads:[~2026-04-28 18:22 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-04-07 16:05 [PATCH] drivers: base: Set mod->async_probe_requested if needed Bart Van Assche
2026-04-28 18:22 ` Danilo Krummrich [this message]
2026-04-28 19:39 ` Bart Van Assche
2026-04-29 21:41 ` Danilo Krummrich
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=DI4ZX1HOWDNH.3G36YTI0MYC76@kernel.org \
--to=dakr@kernel.org \
--cc=atomlin@atomlin.com \
--cc=bvanassche@acm.org \
--cc=chungkai@google.com \
--cc=da.gomez@kernel.org \
--cc=driver-core@lists.linux.dev \
--cc=gregkh@linuxfoundation.org \
--cc=ipylypiv@google.com \
--cc=mcgrof@kernel.org \
--cc=petr.pavlu@suse.com \
--cc=rafael@kernel.org \
--cc=samitolvanen@google.com \
--cc=stable@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