From 14cc93f932cc2ac1649ec5fa0e924d30eb5c5bb9 Mon Sep 17 00:00:00 2001 From: Kamal Heib Date: Mon, 26 Jan 2015 12:03:47 +0200 Subject: [PATCH] rxe: Remove all fast* module parameters Remove all fast* module parameters which used to bypass tasklets. Signed-off-by: Kamal Heib --- drivers/infiniband/hw/rxe/rxe.c | 22 +--------------------- drivers/infiniband/hw/rxe/rxe_param.h | 4 ---- drivers/infiniband/hw/rxe/rxe_qp.c | 6 +++--- drivers/infiniband/hw/rxe/rxe_task.c | 20 ++------------------ drivers/infiniband/hw/rxe/rxe_task.h | 10 ++-------- 5 files changed, 8 insertions(+), 54 deletions(-) diff --git a/drivers/infiniband/hw/rxe/rxe.c b/drivers/infiniband/hw/rxe/rxe.c index 25a40687e44d..a9109fcdcf5a 100644 --- a/drivers/infiniband/hw/rxe/rxe.c +++ b/drivers/infiniband/hw/rxe/rxe.c @@ -38,26 +38,6 @@ MODULE_AUTHOR("Bob Pearson, Frank Zago, John Groves"); MODULE_DESCRIPTION("Soft RDMA transport"); MODULE_LICENSE("Dual BSD/GPL"); -int rxe_fast_comp = 2; -module_param_named(fast_comp, rxe_fast_comp, int, 0644); -MODULE_PARM_DESC(fast_comp, - "fast path call to completer (0=no, 1=no int context, 2=any context)"); - -int rxe_fast_resp = 2; -module_param_named(fast_resp, rxe_fast_resp, int, 0644); -MODULE_PARM_DESC(fast_resp, - "enable fast path call to responder (0=no, 1=no int context, 2=any context)"); - -int rxe_fast_req = 2; -module_param_named(fast_req, rxe_fast_req, int, 0644); -MODULE_PARM_DESC(fast_req, - "enable fast path call to requester (0=no, 1=no int context, 2=any context)"); - -int rxe_fast_arb = 2; -module_param_named(fast_arb, rxe_fast_arb, int, 0644); -MODULE_PARM_DESC(fast_arb, - "enable fast path call to arbiter (0=no, 1=no int context, 2=any context)"); - int rxe_nsec_per_packet = 200; module_param_named(nsec_per_packet, rxe_nsec_per_packet, int, 0644); MODULE_PARM_DESC(nsec_per_packet, @@ -408,7 +388,7 @@ static int rxe_init(struct rxe_dev *rxe) /* init arbiter */ spin_lock_init(&rxe->arbiter.list_lock); INIT_LIST_HEAD(&rxe->arbiter.qp_list); - rxe_init_task(rxe, &rxe->arbiter.task, &rxe_fast_arb, + rxe_init_task(rxe, &rxe->arbiter.task, rxe, rxe_arbiter, "arb"); return 0; diff --git a/drivers/infiniband/hw/rxe/rxe_param.h b/drivers/infiniband/hw/rxe/rxe_param.h index 577b006964c6..1f21286db0f3 100644 --- a/drivers/infiniband/hw/rxe/rxe_param.h +++ b/drivers/infiniband/hw/rxe/rxe_param.h @@ -203,10 +203,6 @@ extern int rxe_max_skb_per_qp; extern int rxe_max_req_comp_gap; extern int rxe_max_pkt_per_ack; extern int rxe_default_mtu; -extern int rxe_fast_comp; -extern int rxe_fast_resp; -extern int rxe_fast_req; -extern int rxe_fast_arb; extern int rxe_bypass_arbiter; #endif /* RXE_PARAM_H */ diff --git a/drivers/infiniband/hw/rxe/rxe_qp.c b/drivers/infiniband/hw/rxe/rxe_qp.c index d9a7f83f5e75..b51dff1edef9 100644 --- a/drivers/infiniband/hw/rxe/rxe_qp.c +++ b/drivers/infiniband/hw/rxe/rxe_qp.c @@ -271,9 +271,9 @@ static int rxe_qp_init_req(struct rxe_dev *rxe, struct rxe_qp *qp, spin_lock_init(&qp->sq.sq_lock); skb_queue_head_init(&qp->req_pkts); - rxe_init_task(rxe, &qp->req.task, &rxe_fast_req, qp, + rxe_init_task(rxe, &qp->req.task, qp, rxe_requester, "req"); - rxe_init_task(rxe, &qp->comp.task, &rxe_fast_comp, qp, + rxe_init_task(rxe, &qp->comp.task, qp, rxe_completer, "comp"); init_timer(&qp->rnr_nak_timer); @@ -324,7 +324,7 @@ static int rxe_qp_init_resp(struct rxe_dev *rxe, struct rxe_qp *qp, skb_queue_head_init(&qp->resp_pkts); - rxe_init_task(rxe, &qp->resp.task, &rxe_fast_resp, qp, + rxe_init_task(rxe, &qp->resp.task, qp, rxe_responder, "resp"); qp->resp.opcode = OPCODE_NONE; diff --git a/drivers/infiniband/hw/rxe/rxe_task.c b/drivers/infiniband/hw/rxe/rxe_task.c index ea04410833fa..81624633f81e 100644 --- a/drivers/infiniband/hw/rxe/rxe_task.c +++ b/drivers/infiniband/hw/rxe/rxe_task.c @@ -112,11 +112,10 @@ void rxe_do_task(unsigned long data) task->ret = ret; } -int rxe_init_task(void *obj, struct rxe_task *task, int *fast, +int rxe_init_task(void *obj, struct rxe_task *task, void *arg, int (*func)(void *), char *name) { task->obj = obj; - task->fast = fast; task->arg = arg; task->func = func; snprintf(task->name, sizeof(task->name), "%s", name); @@ -134,24 +133,9 @@ void rxe_cleanup_task(struct rxe_task *task) tasklet_kill(&task->tasklet); } -/* - * depending on value of fast allow bypassing - * tasklet call or not - * 0 => never - * 1 => only if not in interrupt level - * >1 => always - */ -static inline int rxe_fast_path_ok(int fast) -{ - if (fast == 0 || (fast == 1 && (in_irq() || irqs_disabled()))) - return 0; - else - return 1; -} - void rxe_run_task(struct rxe_task *task, int sched) { - if (sched || !rxe_fast_path_ok(*task->fast)) + if (sched) tasklet_schedule(&task->tasklet); else rxe_do_task((unsigned long)task); diff --git a/drivers/infiniband/hw/rxe/rxe_task.h b/drivers/infiniband/hw/rxe/rxe_task.h index 17226d91f3db..4be3f89f3d4d 100644 --- a/drivers/infiniband/hw/rxe/rxe_task.h +++ b/drivers/infiniband/hw/rxe/rxe_task.h @@ -47,7 +47,6 @@ enum { */ struct rxe_task { void *obj; - int *fast; struct tasklet_struct tasklet; int state; spinlock_t state_lock; /* spinlock for task state */ @@ -59,11 +58,10 @@ struct rxe_task { /* * init rxe_task structure - * fast => address of control flag, likely a module parameter * arg => parameter to pass to fcn * fcn => function to call until it returns != 0 */ -int rxe_init_task(void *obj, struct rxe_task *task, int *fast, +int rxe_init_task(void *obj, struct rxe_task *task, void *arg, int (*func)(void *), char *name); /* @@ -79,8 +77,6 @@ int __rxe_do_task(struct rxe_task *task); /* * common function called by any of the main tasklets - * if someone is calling the function on its own - * thread (fast path) then they must increment busy * If there is any chance that there is additional * work to do someone must reschedule the task before * leaving @@ -88,9 +84,7 @@ int __rxe_do_task(struct rxe_task *task); void rxe_do_task(unsigned long data); /* - * run a task, use fast path if no one else - * is currently running it and fast path is ok - * else schedule it to run as a tasklet + * run a task, else schedule it to run as a tasklet */ void rxe_run_task(struct rxe_task *task, int sched);