[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Message-ID: <aVLDuUAHw0egvFfr@slm.duckdns.org>
Date: Mon, 29 Dec 2025 08:08:57 -1000
From: Tejun Heo <tj@...nel.org>
To: Jinhui Guo <guojinhui.liam@...edance.com>
Cc: bhelgaas@...gle.com, bvanassche@....org, dan.j.williams@...el.com,
alexander.h.duyck@...ux.intel.com, gregkh@...uxfoundation.org,
linux-pci@...r.kernel.org, linux-kernel@...r.kernel.org,
stable@...r.kernel.org
Subject: Re: [PATCH] PCI: Avoid work_on_cpu() in async probe workers
On Sat, Dec 27, 2025 at 07:33:26PM +0800, Jinhui Guo wrote:
> To fix the issue, pci_call_probe() must not call work_on_cpu() when it is
> already running inside an unbounded asynchronous worker. Because a driver
> can be probed asynchronously either by probe_type or by the kernel command
> line, we cannot rely on PROBE_PREFER_ASYNCHRONOUS alone. Instead, we test
> the PF_WQ_WORKER flag in current->flags; if it is set, pci_call_probe() is
> executing within an unbounded workqueue worker and should skip the extra
> work_on_cpu() call.
Why not just use queue_work_on() on system_dfl_wq (or any other unbound
workqueue)? Those are soft-affine to cache domain but can overflow to other
CPUs?
Thanks.
--
tejun
Powered by blists - more mailing lists