From: <dan.j.williams@intel.com>
To: Jinhui Guo <guojinhui.liam@bytedance.com>, <dan.j.williams@intel.com>
Cc: <alexanderduyck@fb.com>, <bhelgaas@google.com>,
<bvanassche@acm.org>, <dakr@kernel.org>, <frederic@kernel.org>,
<gregkh@linuxfoundation.org>, <guojinhui.liam@bytedance.com>,
<helgaas@kernel.org>, <linux-kernel@vger.kernel.org>,
<linux-pci@vger.kernel.org>, <rafael@kernel.org>, <tj@kernel.org>
Subject: Re: [PATCH v2 0/3] Add NUMA-node-aware synchronous probing to driver core
Date: Mon, 26 Jan 2026 19:37:13 -0800 [thread overview]
Message-ID: <697832e9f00c3_309510076@dwillia2-mobl4.notmuch> (raw)
In-Reply-To: <20260126091749.307-1-guojinhui.liam@bytedance.com>
Jinhui Guo wrote:
[..]
> > I like that from a global benefit perspective, but not necessarily from
> > a regression perspective. Is there a minimal fix to PCI to make its
> > current workqueue unbound, then if that goes well come back and move all
> > devices into this scheme?
>
> Hi Dan,
>
> Thank you for your time, and apologies for the delayed reply.
I would not have read an earlier reply over this weekend anyway, so no
worries.
> I understand your concerns about stability and hope for better PCI regression
> handling. However, I believe introducing NUMA-node awareness to the driver
> core's asynchronous probe path is the better solution:
>
> 1. The asynchronous path already uses async_schedule_dev() with queue_work_node()
> to bind workers to specific NUMA nodes—this causes no side effects to driver
> probing.
> 2. I initially submitted a PCI-only fix [1], but handling asynchronous probing in
> PCI driver proved difficult. Using current_is_async() works but feels fragile.
> After discussions with Bjorn and Danilo [2][3], moving the solution to driver
> core makes distinguishing async/sync probing straightforward. Testing shows
> minimal impact on synchronous probe time.
> 3. If you prefer a PCI-only approach, we could add a flag in struct device_driver
> (default false) that PCI sets during registration. This limits the new path to
> PCI devices while others retain existing behavior. The extra code is ~10 lines
> and can be removed once confidence is established.
I am open to this option. One demonstration of how this conversion can
cause odd surprises is what it does to locking assumptions. For example,
I ran into the work_on_cpu(..., local_pci_probe...) behavior with some
of the work-in-progress confidential device work [1]. I was surprised
when lockdep_assert_held() returned false in a driver probe context.
I like that buses can opt-in to this behavior vs it being forced.
Similar to how async-behavior is handled as an opt-in.
[1]: https://git.kernel.org/pub/scm/linux/kernel/git/devsec/tsm.git/tree/drivers/base/coco.c?h=staging#n86
> 4. I'm committed to supporting this: I'll include "Fixes:" tags for any fallout
> and provide patches within a month of any report. Since the logic mirrors the
> core async helper, risk should be low—but I'll take full responsibility
> regardless.
Sounds good.
With the above change you can add:
Acked-by: Dan Williams <dan.j.williams@intel.com>
...and I may carve out some time to upgrade that to Reviewed-by on the
next posting.
prev parent reply other threads:[~2026-01-27 3:37 UTC|newest]
Thread overview: 8+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-01-22 14:52 [PATCH v2 0/3] Add NUMA-node-aware synchronous probing to driver core Jinhui Guo
2026-01-22 14:52 ` [PATCH v2 1/3] driver core: Introduce helper function __device_attach_driver_scan() Jinhui Guo
2026-01-22 14:52 ` [PATCH v2 2/3] driver core: Add NUMA-node awareness to the synchronous probe path Jinhui Guo
2026-01-22 14:52 ` [PATCH v2 3/3] PCI: Clean up NUMA-node awareness in pci_bus_type probe Jinhui Guo
2026-01-24 1:04 ` [PATCH v2 0/3] Add NUMA-node-aware synchronous probing to driver core dan.j.williams
2026-01-26 9:17 ` Jinhui Guo
2026-01-27 2:32 ` Jinhui Guo
2026-01-27 3:37 ` dan.j.williams [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=697832e9f00c3_309510076@dwillia2-mobl4.notmuch \
--to=dan.j.williams@intel.com \
--cc=alexanderduyck@fb.com \
--cc=bhelgaas@google.com \
--cc=bvanassche@acm.org \
--cc=dakr@kernel.org \
--cc=frederic@kernel.org \
--cc=gregkh@linuxfoundation.org \
--cc=guojinhui.liam@bytedance.com \
--cc=helgaas@kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-pci@vger.kernel.org \
--cc=rafael@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