Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux
1
fork

Configure Feed

Select the types of activity you want to include in your feed.

drm/xe: add WQ_PERCPU to alloc_workqueue users

This continues the effort to refactor workqueue APIs, which began with
the introduction of new workqueues and a new alloc_workqueue flag in:

commit 128ea9f6ccfb ("workqueue: Add system_percpu_wq and system_dfl_wq")
commit 930c2ea566af ("workqueue: Add new WQ_PERCPU flag")

The refactoring is going to alter the default behavior of
alloc_workqueue() to be unbound by default.

With the introduction of the WQ_PERCPU flag (equivalent to !WQ_UNBOUND),
any alloc_workqueue() caller that doesn’t explicitly specify WQ_UNBOUND
must now use WQ_PERCPU. For more details see the Link tag below.

In order to keep alloc_workqueue() behavior identical, explicitly request
WQ_PERCPU.

Link: https://lore.kernel.org/all/20250221112
Suggested-by: Tejun Heo <tj@kernel.org>
Signed-off-by: Marco Crivellari <marco.crivellari@suse.com>
Reviewed-by: Rodrigo Vivi <rodrigo.vivi@intel.com>
Link: https://patch.msgid.link/20260202103756.62138-3-marco.crivellari@suse.com
Signed-off-by: Rodrigo Vivi <rodrigo.vivi@intel.com>

authored by

Marco Crivellari and committed by
Rodrigo Vivi
0bc2c2e1 fa171b80

+6 -5
+2 -2
drivers/gpu/drm/xe/xe_device.c
··· 508 508 xe->preempt_fence_wq = alloc_ordered_workqueue("xe-preempt-fence-wq", 509 509 WQ_MEM_RECLAIM); 510 510 xe->ordered_wq = alloc_ordered_workqueue("xe-ordered-wq", 0); 511 - xe->unordered_wq = alloc_workqueue("xe-unordered-wq", 0, 0); 512 - xe->destroy_wq = alloc_workqueue("xe-destroy-wq", 0, 0); 511 + xe->unordered_wq = alloc_workqueue("xe-unordered-wq", WQ_PERCPU, 0); 512 + xe->destroy_wq = alloc_workqueue("xe-destroy-wq", WQ_PERCPU, 0); 513 513 if (!xe->ordered_wq || !xe->unordered_wq || 514 514 !xe->preempt_fence_wq || !xe->destroy_wq) { 515 515 /*
+1 -1
drivers/gpu/drm/xe/xe_ggtt.c
··· 367 367 else 368 368 ggtt->pt_ops = &xelp_pt_ops; 369 369 370 - ggtt->wq = alloc_workqueue("xe-ggtt-wq", WQ_MEM_RECLAIM, 0); 370 + ggtt->wq = alloc_workqueue("xe-ggtt-wq", WQ_MEM_RECLAIM | WQ_PERCPU, 0); 371 371 if (!ggtt->wq) 372 372 return -ENOMEM; 373 373
+2 -1
drivers/gpu/drm/xe/xe_hw_engine_group.c
··· 51 51 if (!group) 52 52 return ERR_PTR(-ENOMEM); 53 53 54 - group->resume_wq = alloc_workqueue("xe-resume-lr-jobs-wq", 0, 0); 54 + group->resume_wq = alloc_workqueue("xe-resume-lr-jobs-wq", WQ_PERCPU, 55 + 0); 55 56 if (!group->resume_wq) 56 57 return ERR_PTR(-ENOMEM); 57 58
+1 -1
drivers/gpu/drm/xe/xe_sriov.c
··· 120 120 xe_sriov_vf_init_early(xe); 121 121 122 122 xe_assert(xe, !xe->sriov.wq); 123 - xe->sriov.wq = alloc_workqueue("xe-sriov-wq", 0, 0); 123 + xe->sriov.wq = alloc_workqueue("xe-sriov-wq", WQ_PERCPU, 0); 124 124 if (!xe->sriov.wq) 125 125 return -ENOMEM; 126 126