RDMA/rxe: Use a dedicated and robust workqueue for RXE tasks
Subsystems (2)
PATCH v2 1/1 RDMA/rxe: Use a dedicated and robust workqueue for RXE tasks
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 <[email protected]>
Signed-off-by Zhu Yanjun <[email protected]>
---
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(-)
drivers/infiniband/sw/rxe/rxe_odp.c +1 -1
@@ -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 ;
drivers/infiniband/sw/rxe/rxe_task.c +7 -0
@@ -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.
drivers/infiniband/sw/rxe/rxe_task.h +1 -0
@@ -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
Signature · 1 line
2.53.0