RDMA/rxe: Add workqueue support for tasks
Subsystems (2)
PATCH v5 1/1 RDMA/rxe: Add workqueue support for tasks
Replace tasklets by work queues for the three main rxe tasklets:rxe_requester, rxe_completer and rxe_responder.
This patch is all that is left from an eariler patch series that also converted tasklets to workqueues with the same subject.
With this patch the rxe driver does not exhibit the soft lockups reported by Daisuke Matsuda in the link below.
This patch depends on an earlier patch series titled "RDMA/rxe: Correct qp reference counting" which corrects the same errors for the current tasklet version.
Link https://lore.kernel.org/linux-rdma/TYCPR01MB845522FD536170D75068DD41E5099@TYCPR01MB8455.jpnprd01.prod.outlook.com/ open here
Signed-off-by Ian Ziemba <[email protected]>
Signed-off-by Bob Pearson <[email protected]>
---
v5:
Based on corrected task logic for tasklets and simplified to only convert from tasklets to workqueues and not provide a flexible interface.
drivers/infiniband/sw/rxe/rxe.c | 9 ++++- drivers/infiniband/sw/rxe/rxe_task.c | 49 +++++++++++++++++++--------- drivers/infiniband/sw/rxe/rxe_task.h | 6 +++- 3 files changed, 47 insertions(+), 17 deletions(-)
drivers/infiniband/sw/rxe/rxe.c +8 -1
@@ -212,10 +212,16 @@ static int __init rxe_module_init(void) {int err; - err =rxe_net_init (); + err =rxe_alloc_wq ();if (err)return err; + err =rxe_net_init (); +if (err) { +rxe_destroy_wq (); +return err; + } +rdma_link_register (&rxe_link_ops);pr_info ("loaded\n" );return 0 ;
@@ -226,6 +232,7 @@ static void __exit rxe_module_exit(void)rdma_link_unregister (&rxe_link_ops);ib_unregister_driver (RDMA_DRIVER_RXE );rxe_net_exit (); +rxe_destroy_wq ();pr_info ("unloaded\n" ); }
drivers/infiniband/sw/rxe/rxe_task.c +34 -15
121 lines not on this page · raw message
drivers/infiniband/sw/rxe/rxe_task.h +5 -1
@@ -22,7 +22,7 @@ enum {* called again. */ struct rxe_task { -struct tasklet_struct tasklet; +struct work_struct work;int state;spinlock_t lock;struct rxe_qp *qp;
@@ -32,6 +32,10 @@ struct rxe_task {long num_done; }; +int rxe_alloc_wq (void ); + +void rxe_destroy_wq (void ); +/* * init rxe_task structure * qp => parameter to pass to func
Signature · 1 line
2.37.2