Re: [PATCH 3/4] amd/amdkfd: WQ_PERCPU added to alloc_workqueue users

From: Philip Yang

Date: Fri Oct 31 2025 - 09:12:26 EST



On 2025-10-31 04:48, Marco Crivellari wrote:
On Thu, Oct 30, 2025 at 6:15 PM Christian König
<christian.koenig@xxxxxxx> wrote:
[...]
Adding Philip and Felix to comment, but this should most likely also not execute on the same CPU as the one who scheduled the work.
Hi Christian,

The actual behavior without WQ_PERCPU is exactly the same: with 0 it
means the workqueue is per-cpu. We just enforced that, adding the
WQ_PERCPU flag, so that it is explicit.

So if you need this to be unbound, I can send the v2 with WQ_UNBOUND
instead of WQ_PERCPU.
Hi,

WQ_UNBOUND is more appropriate here, to execute the KFD release work immediately as long as CPU resource is available, not specific to the CPU that kfd_unref_process the last process refcount.

Thanks,
Philip

Thanks!

--

Marco Crivellari

L3 Support Engineer, Technology & Product