From patchwork Sun Jul 2 06:24:25 2017 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Leon Romanovsky X-Patchwork-Id: 9821053 Return-Path: Received: from mail.wl.linuxfoundation.org (pdx-wl-mail.web.codeaurora.org [172.30.200.125]) by pdx-korg-patchwork.web.codeaurora.org (Postfix) with ESMTP id 46B3060353 for ; Sun, 2 Jul 2017 06:24:32 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 287BA2823D for ; Sun, 2 Jul 2017 06:24:32 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 1908828372; Sun, 2 Jul 2017 06:24:32 +0000 (UTC) X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on pdx-wl-mail.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-6.9 required=2.0 tests=BAYES_00,RCVD_IN_DNSWL_HI autolearn=ham version=3.3.1 Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id CAB572823D for ; Sun, 2 Jul 2017 06:24:30 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1751065AbdGBGY3 (ORCPT ); Sun, 2 Jul 2017 02:24:29 -0400 Received: from mail.kernel.org ([198.145.29.99]:49612 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1750771AbdGBGY2 (ORCPT ); Sun, 2 Jul 2017 02:24:28 -0400 Received: from localhost (unknown [193.47.165.251]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPSA id B96B722BD6; Sun, 2 Jul 2017 06:24:27 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org B96B722BD6 Authentication-Results: mail.kernel.org; dmarc=none (p=none dis=none) header.from=kernel.org Authentication-Results: mail.kernel.org; spf=none smtp.mailfrom=leon@kernel.org From: Leon Romanovsky To: Doug Ledford Cc: linux-rdma@vger.kernel.org, Sagi Grimberg , Leon Romanovsky , Chuck Lever Subject: [PATCH rdma-next V1] RDMA/rw: Remove force_mr module parameter Date: Sun, 2 Jul 2017 09:24:25 +0300 Message-Id: <20170702062425.6780-1-leon@kernel.org> X-Mailer: git-send-email 2.13.2 Sender: linux-rdma-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-rdma@vger.kernel.org X-Virus-Scanned: ClamAV using ClamSMTP From: Leon Romanovsky 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 Signed-off-by: Leon Romanovsky --- 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 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));