From: <dan.j.williams@intel.com>
To: Jinhui Guo <guojinhui.liam@bytedance.com>, <dakr@kernel.org>,
<alexanderduyck@fb.com>, <bhelgaas@google.com>,
<bvanassche@acm.org>, <dan.j.williams@intel.com>,
<gregkh@linuxfoundation.org>, <helgaas@kernel.org>,
<rafael@kernel.org>, <tj@kernel.org>, <frederic@kernel.org>
Cc: <guojinhui.liam@bytedance.com>, <linux-kernel@vger.kernel.org>,
<linux-pci@vger.kernel.org>
Subject: Re: [PATCH v2 0/3] Add NUMA-node-aware synchronous probing to driver core
Date: Fri, 23 Jan 2026 17:04:27 -0800 [thread overview]
Message-ID: <69741a9beae22_309510044@dwillia2-mobl4.notmuch> (raw)
In-Reply-To: <20260122145208.1013-1-guojinhui.liam@bytedance.com>
Jinhui Guo wrote:
> Hi all,
>
> ** Overview **
>
> This patchset introduces NUMA-node-aware synchronous probing.
>
> Drivers can initialize and allocate memory on the device’s local
> node without scattering kmalloc_node() calls throughout the code.
> NUMA-aware probing was added to PCI drivers in 2005 and has
> benefited them ever since.
>
> The asynchronous probe path already supports NUMA-node-aware
> probing via async_schedule_dev() in the driver core. Since NUMA
> affinity is orthogonal to sync/async probing, this patchset adds
> NUMA-node-aware support to the synchronous probe path.
>
> ** Background **
>
> The idea arose from a discussion with Bjorn and Danilo about a
> PCI-probe issue [1]:
>
> when PCI devices on the same NUMA node are probed asynchronously,
> pci_call_probe() calls work_on_cpu(), pins every probe worker to
> the same CPU inside that node, and forces the probes to run serially.
>
> Testing three NVMe devices on the same NUMA node of an AMD EPYC 9A64
> 2.4 GHz processor (all on CPU 0):
>
> nvme 0000:01:00.0: CPU: 0, COMM: kworker/0:1, probe cost: 53372612 ns
> nvme 0000:02:00.0: CPU: 0, COMM: kworker/0:2, probe cost: 49532941 ns
> nvme 0000:03:00.0: CPU: 0, COMM: kworker/0:3, probe cost: 47315175 ns
>
> Since the driver core already provides NUMA-node-aware asynchronous
> probing, we can extend the same capability to the synchronous probe
> path. This solves the issue and lets other drivers benefit from
> NUMA-local initialization as well.
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?
next prev parent reply other threads:[~2026-01-24 1:04 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 ` dan.j.williams [this message]
2026-01-26 9:17 ` [PATCH v2 0/3] Add NUMA-node-aware synchronous probing to driver core Jinhui Guo
2026-01-27 2:32 ` Jinhui Guo
2026-01-27 3:37 ` dan.j.williams
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=69741a9beae22_309510044@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