* [PATCH v2 1/1] RDMA/rxe: Use a dedicated and robust workqueue for RXE tasks
@ 2026-03-18 16:18 Zhu Yanjun
0 siblings, 0 replies; only message in thread
From: Zhu Yanjun @ 2026-03-18 16:18 UTC (permalink / raw)
To: zyjzyj2000, jgg, leon, linux-rdma, yanjun.zhu
Currently, the RXE driver uses the system-wide 'system_unbound_wq' for
auxiliary tasks like ODP prefetching. This can lead to interference
from other system services and lacks guaranteed forward progress
under memory pressure.
Currently make all the tasks queue into the driver-specific 'rxe_wq'.
Suggested-by: Leon Romanovsky <leon@kernel.org>
Signed-off-by: Zhu Yanjun <yanjun.zhu@linux.dev>
---
V1 -> V2: Remove WQ_MEM_RECLAIM
---
drivers/infiniband/sw/rxe/rxe_odp.c | 2 +-
drivers/infiniband/sw/rxe/rxe_task.c | 7 +++++++
drivers/infiniband/sw/rxe/rxe_task.h | 1 +
3 files changed, 9 insertions(+), 1 deletion(-)
diff --git a/drivers/infiniband/sw/rxe/rxe_odp.c b/drivers/infiniband/sw/rxe/rxe_odp.c
index bc11b1ec59ac..98092dcc1870 100644
--- a/drivers/infiniband/sw/rxe/rxe_odp.c
+++ b/drivers/infiniband/sw/rxe/rxe_odp.c
@@ -545,7 +545,7 @@ static int rxe_ib_advise_mr_prefetch(struct ib_pd *ibpd,
work->frags[i].mr = mr;
}
- queue_work(system_unbound_wq, &work->work);
+ rxe_queue_work(&work->work);
return 0;
diff --git a/drivers/infiniband/sw/rxe/rxe_task.c b/drivers/infiniband/sw/rxe/rxe_task.c
index f522820b950c..59e88d759255 100644
--- a/drivers/infiniband/sw/rxe/rxe_task.c
+++ b/drivers/infiniband/sw/rxe/rxe_task.c
@@ -254,6 +254,13 @@ void rxe_sched_task(struct rxe_task *task)
spin_unlock_irqrestore(&task->lock, flags);
}
+/* Helper to queue auxiliary tasks into rxe_wq.
+ */
+void rxe_queue_work(struct work_struct *work)
+{
+ queue_work(rxe_wq, work);
+}
+
/* rxe_disable/enable_task are only called from
* rxe_modify_qp in process context. Task is moved
* to the drained state by do_task.
diff --git a/drivers/infiniband/sw/rxe/rxe_task.h b/drivers/infiniband/sw/rxe/rxe_task.h
index a8c9a77b6027..60c085cc11a7 100644
--- a/drivers/infiniband/sw/rxe/rxe_task.h
+++ b/drivers/infiniband/sw/rxe/rxe_task.h
@@ -36,6 +36,7 @@ int rxe_alloc_wq(void);
void rxe_destroy_wq(void);
+void rxe_queue_work(struct work_struct *work);
/*
* init rxe_task structure
* qp => parameter to pass to func
--
2.53.0
^ permalink raw reply related [flat|nested] only message in thread
only message in thread, other threads:[~2026-03-18 16:18 UTC | newest]
Thread overview: (only message) (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2026-03-18 16:18 [PATCH v2 1/1] RDMA/rxe: Use a dedicated and robust workqueue for RXE tasks Zhu Yanjun
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox