From patchwork Tue Oct 27 22:03:40 2015 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Bart Van Assche X-Patchwork-Id: 7504351 Return-Path: X-Original-To: patchwork-linux-rdma@patchwork.kernel.org Delivered-To: patchwork-parsemail@patchwork1.web.kernel.org Received: from mail.kernel.org (mail.kernel.org [198.145.29.136]) by patchwork1.web.kernel.org (Postfix) with ESMTP id 053BE9F327 for ; Tue, 27 Oct 2015 22:03:51 +0000 (UTC) Received: from mail.kernel.org (localhost [127.0.0.1]) by mail.kernel.org (Postfix) with ESMTP id 192AB209CB for ; Tue, 27 Oct 2015 22:03:50 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.kernel.org (Postfix) with ESMTP id D47DC209C4 for ; Tue, 27 Oct 2015 22:03:48 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1753212AbbJ0WDr (ORCPT ); Tue, 27 Oct 2015 18:03:47 -0400 Received: from mail-bl2on0077.outbound.protection.outlook.com ([65.55.169.77]:3552 "EHLO na01-bl2-obe.outbound.protection.outlook.com" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S1752220AbbJ0WDo (ORCPT ); Tue, 27 Oct 2015 18:03:44 -0400 Received: from BLUPR0201CA0033.namprd02.prod.outlook.com (10.163.116.43) by BY1PR02MB1260.namprd02.prod.outlook.com (10.162.109.14) with Microsoft SMTP Server (TLS) id 15.1.306.13; Tue, 27 Oct 2015 22:03:41 +0000 Received: from BY2FFO11FD037.protection.gbl (2a01:111:f400:7c0c::194) by BLUPR0201CA0033.outlook.office365.com (2a01:111:e400:52e7::43) with Microsoft SMTP Server (TLS) id 15.1.306.13 via Frontend Transport; Tue, 27 Oct 2015 22:03:41 +0000 Authentication-Results: spf=pass (sender IP is 63.163.107.173) smtp.mailfrom=sandisk.com; profitbricks.com; dkim=none (message not signed) header.d=none;profitbricks.com; dmarc=bestguesspass action=none header.from=sandisk.com; Received-SPF: Pass (protection.outlook.com: domain of sandisk.com designates 63.163.107.173 as permitted sender) receiver=protection.outlook.com; client-ip=63.163.107.173; helo=milsmgep12.sandisk.com; Received: from milsmgep12.sandisk.com (63.163.107.173) by BY2FFO11FD037.mail.protection.outlook.com (10.1.14.222) with Microsoft SMTP Server id 15.1.306.13 via Frontend Transport; Tue, 27 Oct 2015 22:03:41 +0000 Received: from MILHUBIP03.sdcorp.global.sandisk.com ( [172.22.12.162]) by milsmgep12.sandisk.com (Symantec Messaging Gateway) with SMTP id 36.D7.32178.DB4FF265; Tue, 27 Oct 2015 15:03:41 -0700 (PDT) Received: from milsmgip12.sandisk.com (10.177.8.100) by MILHUBIP03.sdcorp.global.sandisk.com (10.177.9.96) with Microsoft SMTP Server id 14.3.248.2; Tue, 27 Oct 2015 15:03:41 -0700 X-AuditID: ac160a69-f79f76d000007db2-46-562ff4bdf601 Received: from [10.60.52.33] ( [10.177.8.100]) by milsmgip12.sandisk.com (Symantec Messaging Gateway) with SMTP id 2B.59.04661.DB4FF265; Tue, 27 Oct 2015 15:03:41 -0700 (PDT) Subject: [PATCH 6/7] IB/srp: Introduce target->mr_pool_size To: Doug Ledford References: <562FF404.7000504@sandisk.com> CC: Sagi Grimberg , Sebastian Parschauer , "linux-rdma@vger.kernel.org" From: Bart Van Assche Message-ID: <562FF4BC.6030100@sandisk.com> Date: Tue, 27 Oct 2015 15:03:40 -0700 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:38.0) Gecko/20100101 Thunderbird/38.3.0 MIME-Version: 1.0 In-Reply-To: <562FF404.7000504@sandisk.com> X-Brightmail-Tracker: H4sIAAAAAAAAA+NgFvrBLMWRmVeSWpSXmKPExsWyRoxnke7eL/phBv+u81q8PP+B1eLZoV4W i9fHnzJZnLzN78DiMX3GJlaPP38+M3u833eVzePzJrkAligum5TUnMyy1CJ9uwSujEPvLrIU XBGouHVwBWMDYy9fFyMnh4SAicS7tjZ2CFtM4sK99Wx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ZzxwbbW+LJDtUT2O5Jm17YXxJXp9z9uHnJZmHnTPPJ/x24Wa48nJqvMO3K8qUX TVNTaxu3rzi/PmZ9W8Tn82EuHzf/qK606JJ3KV2yYMW/W9fseF+7CjJrb1u7+pJL0InwYLuT MrM/XVZmu+iXYFolMWeJzH2vzb+sJvzcvnmF2bV1F68XrVZiKc5INNRiLipOBAD9X9kuAgIA AA== X-EOPAttributedMessage: 0 X-Microsoft-Exchange-Diagnostics: 1; BY2FFO11FD037; 1:hQI1Ia15a88MFjEDcV6iCSyHOhNGmacB3XkhBoMcBs1n8ELwq9AM3O7PtfrW1cJ4YoTcPE2j5MzERvc2qQRz/KPYnjMJVB90xPsVIUeMEQBtgk9VD1OyJiTxtej+P/zw1G+NDuAhCmIFkQRS6bMP9IzjtaDnBLi7+/GYikkHKZ4ajQN8r3zbCUMJ6aj+C1jdbVu62oEP68Tcj4EHuwTeNlHn8MVVJuFGJTkDicJ/gof7kDeaz68zks3lmJtUKJZ6m+GklD+5XC1Hr6V+ihUIjg0kMvGATwPlHiXQvgsoqR+Lxc/xVtfYx4gnh0MxijFM2xA7pUDELS9p5n1mKj5judG7q2+37zurciSzqc6epue8cw9OArUA8gR7zVbJdCqmofvroWGjprrQhULAQ+5vZw== X-Forefront-Antispam-Report: CIP:63.163.107.173; CTRY:US; IPV:NLI; EFV:NLI; SFV:NSPM; SFS:(10009020)(6009001)(2980300002)(438002)(189002)(199003)(19580395003)(2950100001)(19580405001)(80316001)(47776003)(69596002)(50466002)(106466001)(65806001)(65956001)(229853001)(54356999)(65816999)(87266999)(92566002)(50986999)(33656002)(83506001)(87936001)(76176999)(86362001)(77096005)(11100500001)(5007970100001)(5001960100002)(64126003)(81156007)(59896002)(5008740100001)(110136002)(23676002)(4001350100001)(97736004)(36756003)(189998001); DIR:OUT; SFP:1101; SCL:1; SRVR:BY1PR02MB1260; H:milsmgep12.sandisk.com; FPR:; SPF:Pass; PTR:InfoDomainNonexistent; MX:1; A:1; LANG:en; X-Microsoft-Exchange-Diagnostics: 1; BY1PR02MB1260; 2:9VNrpfDbF65id7M2QXq0h4ezgalt8N93t6Vv1XV+tx0GJc4d7LlCFfZHA3wJm11KaBF6A7IMhbKy5uH8yJSC/y+eWyuo5FvOaMnr/E/6v22BcpmXVy7ap9jOA+sr1Rqtmo/nin+yqxYRbcOrog3YVSsfIXgeXRLUnL9/FDB7WA0=; 3:enp1otOXGCYuXBycsvhjqtosWY2VFVAjAnSP2Wy+azsNCijlbyQJ8SqTEevvO4iNMytuCiT6acZ737m4cAyNOo6jaYTQ1E5msHtFlSd8WeOlASw8C+XqMsIesvZkZ7ltgzVO7FsjfxeVsubk8ifvrKt8eIZXXeUPNA8JMjSOGqlgUNlAxsJqKmDBivIU3mkThY/jTl2t3kyNmhhWZQNv1JcMAC69MsfhI60G4GHoBHRaQR6RYh/AUNI0SmyMykV81GaR16B61PkBir77X7hCSg==; 25:4IPLGbIB33lrwe8OTnfEOWPc1K5AdGmxXwqz9fCST7oNQtYV3mvQ1ebraq6Wa9tW4wB9Zy9WyK83PPwmwu+5MvUOHqO8Uawi7ILbyLYm+6M7b6lDe1TdyOhhxMUkj6c4XD/+WDSrQGE/RqS0fY0rICONQAdJeeCI86vvAA3YiDuDP09QsQudSUigg1q1eK9jg+juAmJ5dr3IUL+6ejE48FtF22UxUO+f8P/m6Nytz0N1ZVOxSEsIAHbHyTNjRE4ivnbz2eLrtnpEKsHW432fMA== X-Microsoft-Antispam: UriScan:; BCL:0; PCL:0; RULEID:(8251501001); SRVR:BY1PR02MB1260; X-Microsoft-Exchange-Diagnostics: 1; BY1PR02MB1260; 20:exXRJqsaMNLcXkFuDwdysgcsJSAAisI8IsRC9qphwrHf/JGP0Fsfc1h1mpzCbAGESDbsWyB7QW+kOBb1AgHnojjoSepq+mz4G/u49+xNxu2l6IREsU0iHyCb8eNqPulWsrWvsbAQZX4FSVxJOhkoqncl10BtC4hYyj86zUuKxZrh9cudWmz7foEb56yEnoN5cj2CKQ33yX89YZjY5R5V4RVmb82TDQEqXDKDrMd5tw1OIIt5tDFWbWSwksB4qOI5AoMHLI4rHq6oKaECeY4B5uYG8NgHW9LuMVziPU3Em11Z6/aTch4Ld52FtQapL59KyJ/zTxUqqTP2K6S3FkkFUEWRUytsAMMf6B+oCQb5RzCrZxNXlMQFGsonxvnmu3oW+KDzOtju6xGgHKABM9YC8cOhd/nc4a/TxtNTnctFT3lS3yMUPloDHXfxZGXWvHKLxUfi3quY9kqyQ93RNJeuOPCnAhriZBCo9HBssvkftMLXxhx0DcSO8If1cm71UFlL; 4:gAbR4rg6RUmau3rSCwCRCusUtg1Qi+OGCpuDg2qGPQ0KtwV/nRuBmLGwR6FlWLXTHmRmZTlp9ofjxZ7azOV/4pP4Kn+mw9owrn4qGtuk5MattSXrnIVGHu7fejD2wkwnoRuBlYxrrPfbMDE/HGzqtXJQeeM+DJB13W4EL5FuD5YooGUoVl9ggQ4LcOzLnyYPL0pS7L8BpnXYVWKdIR/OBghK60mlLEoSjNhXG6DMXvpn1C/AaXXaNriBwkiX7BGg6A4b2Lv6zgfHNFOHLH97nlr0tqbwRfVMVwWU7UW5NyzZGCSRUPEcDWiK2V3yDyz4ZsBtLC5YgpJ123KcGGwoLS1VQNfJAq7MkPRh59cQfbM2VNQ9e25Ta1V5rfXeiusG X-Microsoft-Antispam-PRVS: X-Exchange-Antispam-Report-Test: UriScan:(34787635062028)(42932892334569); X-Exchange-Antispam-Report-CFA-Test: BCL:0; PCL:0; RULEID:(601004)(2401047)(520078)(5005006)(8121501046)(3002001)(102215026); SRVR:BY1PR02MB1260; BCL:0; PCL:0; RULEID:; SRVR:BY1PR02MB1260; X-Forefront-PRVS: 0742443479 X-Microsoft-Exchange-Diagnostics: =?utf-8?B?MTtCWTFQUjAyTUIxMjYwOzIzOlRMRXdneGZrMktiRVhab1U5OHVycVppRFdo?= =?utf-8?B?VFV1cDlOUFB3M3oyTFNIYjZ1WEZDdWh2WENOUlJrVGZVLzFSNlpkTGJZcFZW?= =?utf-8?B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u4AEcb4cDKvdsl3K4iP+Y7fUJs5ptbZ7cG7H SpamDiagnosticOutput: 1:23 SpamDiagnosticMetadata: NSPM X-OriginatorOrg: sandisk.com X-MS-Exchange-CrossTenant-OriginalArrivalTime: 27 Oct 2015 22:03:41.2129 (UTC) X-MS-Exchange-CrossTenant-Id: fcd9ea9c-ae8c-460c-ab3c-3db42d7ac64d X-MS-Exchange-CrossTenant-OriginalAttributedTenantConnectingIp: TenantId=fcd9ea9c-ae8c-460c-ab3c-3db42d7ac64d; Ip=[63.163.107.173]; Helo=[milsmgep12.sandisk.com] X-MS-Exchange-CrossTenant-FromEntityHeader: HybridOnPrem X-MS-Exchange-Transport-CrossTenantHeadersStamped: BY1PR02MB1260 Sender: linux-rdma-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-rdma@vger.kernel.org X-Spam-Status: No, score=-6.9 required=5.0 tests=BAYES_00, RCVD_IN_DNSWL_HI, RP_MATCHES_RCVD, UNPARSEABLE_RELAY autolearn=ham version=3.3.1 X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on mail.kernel.org X-Virus-Scanned: ClamAV using ClamSMTP This patch does not change any functionality. Signed-off-by: Bart Van Assche Cc: Sagi Grimberg Cc: Sebastian Parschauer Reviewed-by: Sagi Grimberg --- drivers/infiniband/ulp/srp/ib_srp.c | 6 +++--- drivers/infiniband/ulp/srp/ib_srp.h | 1 + 2 files changed, 4 insertions(+), 3 deletions(-) diff --git a/drivers/infiniband/ulp/srp/ib_srp.c b/drivers/infiniband/ulp/srp/ib_srp.c index fb6b654..47c3a72 100644 --- a/drivers/infiniband/ulp/srp/ib_srp.c +++ b/drivers/infiniband/ulp/srp/ib_srp.c @@ -315,7 +315,7 @@ static struct ib_fmr_pool *srp_alloc_fmr_pool(struct srp_target_port *target) struct ib_fmr_pool_param fmr_param; memset(&fmr_param, 0, sizeof(fmr_param)); - fmr_param.pool_size = target->scsi_host->can_queue; + fmr_param.pool_size = target->mr_pool_size; fmr_param.dirty_watermark = fmr_param.pool_size / 4; fmr_param.cache = 1; fmr_param.max_pages_per_fmr = dev->max_pages_per_mr; @@ -449,8 +449,7 @@ static struct srp_fr_pool *srp_alloc_fr_pool(struct srp_target_port *target) { struct srp_device *dev = target->srp_host->srp_dev; - return srp_create_fr_pool(dev->dev, dev->pd, - target->scsi_host->can_queue, + return srp_create_fr_pool(dev->dev, dev->pd, target->mr_pool_size, dev->max_pages_per_mr); } @@ -3247,6 +3246,7 @@ static ssize_t srp_create_target(struct device *dev, } target_host->sg_tablesize = target->sg_tablesize; + target->mr_pool_size = target->scsi_host->can_queue; target->indirect_size = target->sg_tablesize * sizeof (struct srp_direct_buf); target->max_iu_len = sizeof (struct srp_cmd) + diff --git a/drivers/infiniband/ulp/srp/ib_srp.h b/drivers/infiniband/ulp/srp/ib_srp.h index 1c6a715..af084f7 100644 --- a/drivers/infiniband/ulp/srp/ib_srp.h +++ b/drivers/infiniband/ulp/srp/ib_srp.h @@ -205,6 +205,7 @@ struct srp_target_port { char target_name[32]; unsigned int scsi_id; unsigned int sg_tablesize; + int mr_pool_size; int queue_size; int req_ring_size; int comp_vector;