[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Message-Id: <20260120172316.652-1-guojinhui.liam@bytedance.com>
Date: Wed, 21 Jan 2026 01:23:16 +0800
From: "Jinhui Guo" <guojinhui.liam@...edance.com>
To: <dakr@...nel.org>
Cc: <alexander.h.duyck@...ux.intel.com>, <alexanderduyck@...com>,
<bhelgaas@...gle.com>, <bvanassche@....org>, <dan.j.williams@...el.com>,
<gregkh@...uxfoundation.org>, <guojinhui.liam@...edance.com>,
<helgaas@...nel.org>, <linux-kernel@...r.kernel.org>,
<linux-pci@...r.kernel.org>, <rafael@...nel.org>, <tj@...nel.org>
Subject: Re: [PATCH 2/3] driver core: Add NUMA-node awareness to the synchronous probe path
On Sat Jan 17, 2026 15:03:08 +0100, Danilo Krummrich wrote:
> On Wed Jan 7, 2026 at 6:55 PM CET, Jinhui Guo wrote:
> > @@ -808,6 +894,8 @@ static int __driver_probe_device(const struct device_driver *drv, struct device
> > return ret;
> > }
> >
> > +DEFINE_NUMA_WRAPPER(__driver_probe_device, const struct device_driver *, struct device *)
> > +
> > /**
> > * driver_probe_device - attempt to bind device & driver together
> > * @drv: driver to bind a device to
> > @@ -844,6 +932,8 @@ static int driver_probe_device(const struct device_driver *drv, struct device *d
> > return ret;
> > }
> >
> > +DEFINE_NUMA_WRAPPER(driver_probe_device, const struct device_driver *, struct device *)
> > +
> > static inline bool cmdline_requested_async_probing(const char *drv_name)
> > {
> > bool async_drv;
> > @@ -1000,6 +1090,8 @@ static int __device_attach_driver_scan(struct device_attach_data *data,
> > return ret;
> > }
> >
> > +DEFINE_NUMA_WRAPPER(__device_attach_driver_scan, struct device_attach_data *, bool *)
>
> Why define three different wrappers? To me it looks like we should easily get
> away with a single wrapper for __driver_probe_device(), which could just be
> __driver_probe_device_node().
>
>
> __device_attach_driver_scan() already has this information (i.e. we can check if
> need_async == NULL). Additionally, we can change the signature of
> driver_probe_device() to
>
> static int driver_probe_device(const struct device_driver *drv, struct device *dev, bool async)
>
> This reduces complexity a lot, since it gets us rid of DEFINE_NUMA_WRAPPER() and
> EXEC_ON_NUMA_NODE() macros.
Hi Danilo,
Thank you for your time and helpful comments.
Apologies for the delayed reply. I understand your concern: before sending this
patchset I prototyped a version that added __driver_probe_device_node() and
relied solely on current_is_async() to detect an async worker, without changing
driver_probe_device()’s signature. That proved fragile, so I abandoned it; your
suggestion is the more reliable path forward.
I’ve spent the last couple of days preparing a new patch and will send it out
after testing.
Best Regards,
Jinhui
Powered by blists - more mailing lists