diff mbox

[rdma-next,V1] RDMA/rw: Remove force_mr module parameter

Message ID 20170702062425.6780-1-leon@kernel.org (mailing list archive)
State Rejected
Headers show

Commit Message

Leon Romanovsky July 2, 2017, 6:24 a.m. UTC
From: Leon Romanovsky <leonro@mellanox.com>

The force_mr module parameter was introduced in the commit
a060b5629ab0 ("IB/core: generic RDMA READ/WRITE API").

From the beginning, the fourth parameter of the module_param_named
macro was set to 0. Passing 0 there means that module parameter is not
created and that adding "options ib_core force_mr=1" to a modprobe.conf
file has no effect.

Since the force_mr parameter is intended for debug and unlikely will be used
by anyone except developers and exposure of module parameter can limit
ourselves in debug ability. The preferable way will be to remove this
module parameter entirely and don't fix the file permission parameter
(the fourth parameter).

Fixes: a060b5629ab0 ("IB/core: generic RDMA READ/WRITE API")
Signed-off-by: Chuck Lever <chuck.lever@oracle.com>
Signed-off-by: Leon Romanovsky <leonro@mellanox.com>
---
Chuck,

I added your SOB to this commit, because this commit message was highly influenced
by yours initial patch.

Please let me know if it is fine with you.

Thanks

Changelog:
v0->v1:
1. Rewrote commit message and comment in the code
2. Removed extra blank line
---
 drivers/infiniband/core/rw.c | 7 ++++---
 1 file changed, 4 insertions(+), 3 deletions(-)

--
2.13.2

--
To unsubscribe from this list: send the line "unsubscribe linux-rdma" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html

Comments

Christoph Hellwig July 2, 2017, 3:35 p.m. UTC | #1
NAK.  It's a very useful debug helper and should instead also be
exposed at runtime.
--
To unsubscribe from this list: send the line "unsubscribe linux-rdma" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Leon Romanovsky July 2, 2017, 5:56 p.m. UTC | #2
On Sun, Jul 02, 2017 at 08:35:32AM -0700, Christoph Hellwig wrote:
> NAK.  It's a very useful debug helper and should instead also be
> exposed at runtime.

So dramatic,
Last time, you wrote that you (AUTHOR) didn't use this module parameter,
so what did happen from that post?

----
https://www.spinics.net/lists/linux-rdma/msg49891.html
I think I only added it on requests from someone (you?), and when
writing the code debugged it by manually forcing it to on.
----

No one is removing the logic and the code in the IB/core, the change is
here is in removing visibility to the user.

Thanks
diff mbox

Patch

diff --git a/drivers/infiniband/core/rw.c b/drivers/infiniband/core/rw.c
index dbfd854c32c9..447099574ede 100644
--- a/drivers/infiniband/core/rw.c
+++ b/drivers/infiniband/core/rw.c
@@ -22,9 +22,10 @@  enum {
 	RDMA_RW_SIG_MR,
 };

+/*
+ * Debug option to force MR registration logic.
+ */
 static bool rdma_rw_force_mr;
-module_param_named(force_mr, rdma_rw_force_mr, bool, 0);
-MODULE_PARM_DESC(force_mr, "Force usage of MRs for RDMA READ/WRITE operations");

 /*
  * Check if the device might use memory registration.  This is currently only
@@ -503,7 +504,7 @@  struct ib_send_wr *rdma_rw_ctx_wrs(struct rdma_rw_ctx *ctx, struct ib_qp *qp,
 		rdma_rw_update_lkey(&ctx->sig->data, true);
 		if (ctx->sig->prot.mr)
 			rdma_rw_update_lkey(&ctx->sig->prot, true);
-
+
 		ctx->sig->sig_mr->need_inval = true;
 		ib_update_fast_reg_key(ctx->sig->sig_mr,
 			ib_inc_rkey(ctx->sig->sig_mr->lkey));