* [PATCH 0/2] accel: Replace deprecated create_singlethread_workqueue
@ 2026-09-25 12:48 George Karagounis
2026-09-25 12:48 ` [PATCH 1/2] accel/amdxdna: Replace create_singlethread_workqueue with alloc_ordered_workqueue George Karagounis
2026-09-25 12:48 ` [PATCH 2/2] accel/habanalabs: " George Karagounis
0 siblings, 2 replies; 4+ messages in thread
From: George Karagounis @ 2026-09-25 12:48 UTC (permalink / raw)
To: Min Ma, Lizhi Hou, Oded Gabbay
Cc: Koby Elbaz, Konstantin Sinyuk, dri-devel, linux-kernel, mail
Hi maintainers,
This patch series replaces the deprecated create_singlethread_workqueue()
with the more efficient alloc_ordered_workqueue() in the amdxdna and
habanalabs accel drivers.
Both patches have been compile tested with W=1 and produce no warnings.
Best regards,
George
George Karagounis (2):
accel/amdxdna: Replace create_singlethread_workqueue with
alloc_ordered_workqueue
accel/habanalabs: Replace create_singlethread_workqueue with
alloc_ordered_workqueue
drivers/accel/amdxdna/amdxdna_mailbox.c | 2 +-
drivers/accel/habanalabs/common/device.c | 6 +++---
2 files changed, 4 insertions(+), 4 deletions(-)
--
2.55.0
^ permalink raw reply [flat|nested] 4+ messages in thread
* [PATCH 1/2] accel/amdxdna: Replace create_singlethread_workqueue with alloc_ordered_workqueue
2026-09-25 12:48 [PATCH 0/2] accel: Replace deprecated create_singlethread_workqueue George Karagounis
@ 2026-09-25 12:48 ` George Karagounis
2026-09-25 18:34 ` Lizhi Hou
2026-09-25 12:48 ` [PATCH 2/2] accel/habanalabs: " George Karagounis
1 sibling, 1 reply; 4+ messages in thread
From: George Karagounis @ 2026-09-25 12:48 UTC (permalink / raw)
To: Min Ma, Lizhi Hou, Oded Gabbay
Cc: Koby Elbaz, Konstantin Sinyuk, dri-devel, linux-kernel, mail
create_singlethread_workqueue() is deprecated. Replace it with
alloc_ordered_workqueue() to use the shared system workqueue
infrastructure more efficiently.
WQ_MEM_RECLAIM is added to ensure the mailbox can process
interrupts under memory pressure.
Signed-off-by: George Karagounis <mail@taterr.org>
---
drivers/accel/amdxdna/amdxdna_mailbox.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/drivers/accel/amdxdna/amdxdna_mailbox.c b/drivers/accel/amdxdna/amdxdna_mailbox.c
index cc8865f4e79c..05c3786de135 100644
--- a/drivers/accel/amdxdna/amdxdna_mailbox.c
+++ b/drivers/accel/amdxdna/amdxdna_mailbox.c
@@ -481,7 +481,7 @@ struct mailbox_channel *xdna_mailbox_alloc_channel(struct mailbox *mb)
return NULL;
INIT_WORK(&mb_chann->rx_work, mailbox_rx_worker);
- mb_chann->work_q = create_singlethread_workqueue(MAILBOX_NAME);
+ mb_chann->work_q = alloc_ordered_workqueue(MAILBOX_NAME, WQ_MEM_RECLAIM);
if (!mb_chann->work_q) {
MB_ERR(mb_chann, "Create workqueue failed");
goto free_chann;
--
2.55.0
^ permalink raw reply [flat|nested] 4+ messages in thread
* [PATCH 2/2] accel/habanalabs: Replace create_singlethread_workqueue with alloc_ordered_workqueue
2026-09-25 12:48 [PATCH 0/2] accel: Replace deprecated create_singlethread_workqueue George Karagounis
2026-09-25 12:48 ` [PATCH 1/2] accel/amdxdna: Replace create_singlethread_workqueue with alloc_ordered_workqueue George Karagounis
@ 2026-09-25 12:48 ` George Karagounis
1 sibling, 0 replies; 4+ messages in thread
From: George Karagounis @ 2026-09-25 12:48 UTC (permalink / raw)
To: Min Ma, Lizhi Hou, Oded Gabbay
Cc: Koby Elbaz, Konstantin Sinyuk, dri-devel, linux-kernel, mail
create_singlethread_workqueue() is deprecated. Replace it with
alloc_ordered_workqueue() for the command, event, and reset
workqueues.
Use the %s format string specifier to satisfy the API
requirements for variable workqueue names. WQ_MEM_RECLAIM is
added to ensure hardware events are processed under memory
pressure.
Signed-off-by: George Karagounis <mail@taterr.org>
---
drivers/accel/habanalabs/common/device.c | 6 +++---
1 file changed, 3 insertions(+), 3 deletions(-)
diff --git a/drivers/accel/habanalabs/common/device.c b/drivers/accel/habanalabs/common/device.c
index 09b27bac3a31..cfccaf7a584f 100644
--- a/drivers/accel/habanalabs/common/device.c
+++ b/drivers/accel/habanalabs/common/device.c
@@ -902,7 +902,7 @@ static int device_early_init(struct hl_device *hdev)
for (i = 0 ; i < hdev->asic_prop.completion_queues_count ; i++) {
snprintf(workq_name, 32, "hl%u-free-jobs-%u", hdev->cdev_idx, (u32) i);
- hdev->cq_wq[i] = create_singlethread_workqueue(workq_name);
+ hdev->cq_wq[i] = alloc_ordered_workqueue("%s", WQ_MEM_RECLAIM, workq_name);
if (hdev->cq_wq[i] == NULL) {
dev_err(hdev->dev, "Failed to allocate CQ workqueue\n");
rc = -ENOMEM;
@@ -911,7 +911,7 @@ static int device_early_init(struct hl_device *hdev)
}
snprintf(workq_name, 32, "hl%u-events", hdev->cdev_idx);
- hdev->eq_wq = create_singlethread_workqueue(workq_name);
+ hdev->eq_wq = alloc_ordered_workqueue("%s", WQ_MEM_RECLAIM, workq_name);
if (hdev->eq_wq == NULL) {
dev_err(hdev->dev, "Failed to allocate EQ workqueue\n");
rc = -ENOMEM;
@@ -957,7 +957,7 @@ static int device_early_init(struct hl_device *hdev)
hl_mem_mgr_init(hdev->dev, &hdev->kernel_mem_mgr);
snprintf(workq_name, 32, "hl%u_device_reset", hdev->cdev_idx);
- hdev->reset_wq = create_singlethread_workqueue(workq_name);
+ hdev->reset_wq = alloc_ordered_workqueue("%s", WQ_MEM_RECLAIM, workq_name);
if (!hdev->reset_wq) {
rc = -ENOMEM;
dev_err(hdev->dev, "Failed to create device reset WQ\n");
--
2.55.0
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: [PATCH 1/2] accel/amdxdna: Replace create_singlethread_workqueue with alloc_ordered_workqueue
2026-09-25 12:48 ` [PATCH 1/2] accel/amdxdna: Replace create_singlethread_workqueue with alloc_ordered_workqueue George Karagounis
@ 2026-09-25 18:34 ` Lizhi Hou
0 siblings, 0 replies; 4+ messages in thread
From: Lizhi Hou @ 2026-09-25 18:34 UTC (permalink / raw)
To: George Karagounis, Min Ma, Oded Gabbay
Cc: Koby Elbaz, Konstantin Sinyuk, dri-devel, linux-kernel, mail
On 9/25/26 05:48, George Karagounis wrote:
> create_singlethread_workqueue() is deprecated. Replace it with
>
> alloc_ordered_workqueue() to use the shared system workqueue
>
> infrastructure more efficiently.
>
> WQ_MEM_RECLAIM is added to ensure the mailbox can process
>
> interrupts under memory pressure.
>
> Signed-off-by: George Karagounis <mail@taterr.org>
> ---
> drivers/accel/amdxdna/amdxdna_mailbox.c | 2 +-
> 1 file changed, 1 insertion(+), 1 deletion(-)
>
> diff --git a/drivers/accel/amdxdna/amdxdna_mailbox.c b/drivers/accel/amdxdna/amdxdna_mailbox.c
> index cc8865f4e79c..05c3786de135 100644
> --- a/drivers/accel/amdxdna/amdxdna_mailbox.c
> +++ b/drivers/accel/amdxdna/amdxdna_mailbox.c
> @@ -481,7 +481,7 @@ struct mailbox_channel *xdna_mailbox_alloc_channel(struct mailbox *mb)
> return NULL;
>
> INIT_WORK(&mb_chann->rx_work, mailbox_rx_worker);
> - mb_chann->work_q = create_singlethread_workqueue(MAILBOX_NAME);
> + mb_chann->work_q = alloc_ordered_workqueue(MAILBOX_NAME, WQ_MEM_RECLAIM);
Reviewed-by: Lizhi Hou <lizhi.hou@amd.com>
> if (!mb_chann->work_q) {
> MB_ERR(mb_chann, "Create workqueue failed");
> goto free_chann;
^ permalink raw reply [flat|nested] 4+ messages in thread
end of thread, other threads:[~2026-09-25 18:34 UTC | newest]
Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2026-09-25 12:48 [PATCH 0/2] accel: Replace deprecated create_singlethread_workqueue George Karagounis
2026-09-25 12:48 ` [PATCH 1/2] accel/amdxdna: Replace create_singlethread_workqueue with alloc_ordered_workqueue George Karagounis
2026-09-25 18:34 ` Lizhi Hou
2026-09-25 12:48 ` [PATCH 2/2] accel/habanalabs: " George Karagounis
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox
all inboxes | Powered by JetHome®