From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-8.6 required=3.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,HEADER_FROM_DIFFERENT_DOMAINS, MAILING_LIST_MULTI,NICE_REPLY_A,SIGNED_OFF_BY,SPF_HELO_NONE,SPF_PASS, URIBL_BLOCKED,USER_AGENT_SANE_1 autolearn=ham autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id AE321C433DF for ; Thu, 8 Oct 2020 22:47:19 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by mail.kernel.org (Postfix) with ESMTP id 34B4D22247 for ; Thu, 8 Oct 2020 22:47:19 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=pass (2048-bit key) header.d=nvidia.com header.i=@nvidia.com header.b="o+Td0r+y" Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1729123AbgJHWrS (ORCPT ); Thu, 8 Oct 2020 18:47:18 -0400 Received: from hqnvemgate25.nvidia.com ([216.228.121.64]:17791 "EHLO hqnvemgate25.nvidia.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1725857AbgJHWrS (ORCPT ); Thu, 8 Oct 2020 18:47:18 -0400 Received: from hqmail.nvidia.com (Not Verified[216.228.121.13]) by hqnvemgate25.nvidia.com (using TLS: TLSv1.2, AES256-SHA) id ; Thu, 08 Oct 2020 15:46:21 -0700 Received: from [172.27.0.178] (172.20.13.39) by HQMAIL107.nvidia.com (172.20.187.13) with Microsoft SMTP Server (TLS) id 15.0.1473.3; Thu, 8 Oct 2020 22:47:07 +0000 Subject: Re: reduce iSERT Max IO size To: Krishnamraju Eraparaju , Bernard Metzler CC: Sagi Grimberg , , "Potnuri Bharat Teja" , Max Gurtovoy References: <20201007033619.GA11425@chelsio.com> <20200922104424.GA18887@chelsio.com> <07e53835-8389-3e07-6976-505edbd94f2a@grimberg.me> <20201002171007.GA16636@chelsio.com> <4d0b1a3f-2980-c7ed-ef9a-0ed6a9c87a69@grimberg.me> <20201003033644.GA19516@chelsio.com> <4391e240-5d6d-fb59-e6fb-e7818d1d0bd2@nvidia.com> <20201008185905.GA21229@chelsio.com> From: Max Gurtovoy Message-ID: Date: Fri, 9 Oct 2020 01:47:04 +0300 User-Agent: Mozilla/5.0 (Windows NT 10.0; WOW64; rv:68.0) Gecko/20100101 Thunderbird/68.12.1 MIME-Version: 1.0 In-Reply-To: <20201008185905.GA21229@chelsio.com> Content-Type: text/plain; charset="utf-8"; format=flowed Content-Transfer-Encoding: 7bit Content-Language: en-US X-Originating-IP: [172.20.13.39] X-ClientProxiedBy: HQMAIL107.nvidia.com (172.20.187.13) To HQMAIL107.nvidia.com (172.20.187.13) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=nvidia.com; s=n1; t=1602197181; bh=RQx21lIJIpLHn+D/jTqXYWX2Cm9VMDWYKHEAtpI62oY=; h=Subject:To:CC:References:From:Message-ID:Date:User-Agent: MIME-Version:In-Reply-To:Content-Type:Content-Transfer-Encoding: Content-Language:X-Originating-IP:X-ClientProxiedBy; b=o+Td0r+yXxILGoxVrhX0WYdk3EDmGNh7D0dsiv5o6JJzHQhQWJU1WJDS8Hc/rz+ab AP6V71vRLekWbCUnfzN/T3dfxFl8SSo78HU+EQuuUIcGNGMMKVecv44E313rLEUXU+ DNacnYOU0DsOToa6sFWUgjvcUq0o0wUdS+dICdw8+YFrPDzJIFzNxg4fuKQIFoEUm/ HkS5lHl/ufQSorFGD/+3aZqfPgcpJQIQugrvr8nRN5EUBwB36IOEzrA795pPvtTTgt Ej6SNTGhG4KDxmX5LrjsXXJp6w0YuiXdX+zdOwjmfLJg0Gk31DqMLFdQoY3H1+H22g cITj7t+8DxP1A== Precedence: bulk List-ID: X-Mailing-List: linux-rdma@vger.kernel.org On 10/8/2020 9:59 PM, Krishnamraju Eraparaju wrote: > On Thursday, October 10/08/20, 2020 at 13:12:39 +0000, Bernard Metzler wrote: >> -----"Krishnamraju Eraparaju" wrote: ----- >> >>> To: "Max Gurtovoy" >>> From: "Krishnamraju Eraparaju" >>> Date: 10/07/2020 05:36AM >>> Cc: "Sagi Grimberg" , linux-rdma@vger.kernel.org, >>> "Potnuri Bharat Teja" , "Max Gurtovoy" >>> >>> Subject: [EXTERNAL] Re: reduce iSERT Max IO size >>> >>> On Sunday, October 10/04/20, 2020 at 00:45:26 +0300, Max Gurtovoy >>> wrote: >>>> On 10/3/2020 6:36 AM, Krishnamraju Eraparaju wrote: >>>>> On Friday, October 10/02/20, 2020 at 13:29:30 -0700, Sagi Grimberg >>> wrote: >>>>>>> Hi Sagi & Max, >>>>>>> >>>>>>> Any update on this? >>>>>>> Please change the max IO size to 1MiB(256 pages). >>>>>> I think that the reason why this was changed to handle the worst >>> case >>>>>> was in case there are different capabilities on the initiator and >>> the >>>>>> target with respect to number of pages per MR. There is no >>> handshake >>>>>> that aligns expectations. >>>>> But, the max pages per MR supported by most adapters is around 256 >>> pages >>>>> only. >>>>> And I think only those iSER initiators, whose max pages per MR is >>> 4096, >>>>> could send 16MiB sized IOs, am I correct? >>>> If the initiator can send 16MiB, we must make sure the target is >>>> capable to receive it. >>> I think max IO size, at iSER initiator, depends on >>> "max_fast_reg_page_list_len". >>> currently, below are the supported "max_fast_reg_page_list_len" of >>> various iwarp drivers: >>> >>> iw_cxgb4: 128 pages >>> Softiwarp: 256 pages >>> i40iw: 512 pages >>> qedr: couldn't find. >>> >> For siw, this limit is not determined by resource constraints. >> We could bump it up to 512, or higher. What is a reasonable >> maximum, from iSER view? > If the most common IO sizes are 4K & 8K, then the reasonable max IO size of > 256 pages(1 MiB) would be appropriate, by default. currently, NVMet-rdma > also limits max IO size to 1MiB. We can set a default to 1MiB, and add module param that can increase this size to a max IO size of 16MiB. I'll sent a patch early next week. >> >>> For iwarp case, if 512 is the max pages supported by all iwarp >>> drivers, >>> then provisioning a gigantic MR pool at target(to accommodate never >>> used >>> 16MiB IO) wouldn't be a overkill? >>>>>> If we revert that it would restore the issue that you reported in >>> the >>>>>> first place: >>>>>> >>>>>> -- >>>>>> IB/isert: allocate RW ctxs according to max IO size >>>>> I don't see the reported issue after reducing the IO size to 256 >>>>> pages(keeping all other changes of this patch intact). >>>>> That is, "attr.cap.max_rdma_ctxs" is now getting filled properly >>> with >>>>> "rdma_rw_mr_factor()" related changes, I think. >>>>> >>>>> Before this change "attr.cap.max_rdma_ctxs" was hardcoded with >>>>> 128(ISCSI_DEF_XMIT_CMDS_MAX) pages, which is very low for single >>> target >>>>> and muli-luns case. >>>>> >>>>> So reverting only ISCSI_ISER_MAX_SG_TABLESIZE macro to 256 doesn't >>> cause the >>>>> reported issue. >>>>> >>>>> Thanks, >>>>> Krishnam Raju. >>>>>> Current iSER target code allocates MR pool budget based on queue >>> size. >>>>>> Since there is no handshake between iSER initiator and target on >>> max IO >>>>>> size, we'll set the iSER target to support upto 16MiB IO >>> operations and >>>>>> allocate the correct number of RDMA ctxs according to the factor >>> of MR's >>>>>> per IO operation. This would guaranty sufficient size of the MR >>> pool for >>>>>> the required IO queue depth and IO size. >>>>>> >>>>>> Reported-by: Krishnamraju Eraparaju >>>>>> Tested-by: Krishnamraju Eraparaju >>>>>> Signed-off-by: Max Gurtovoy >>>>>> -- >>>>>> >>>>>>> Thanks, >>>>>>> Krishnam Raju. >>>>>>> On Wednesday, September 09/23/20, 2020 at 01:57:47 -0700, Sagi >>> Grimberg wrote: >>>>>>>>> Hi, >>>>>>>>> >>>>>>>>> Please reduce the Max IO size to 1MiB(256 pages), at iSER >>> Target. >>>>>>>>> The PBL memory consumption has increased significantly after >>> increasing >>>>>>>>> the Max IO size to 16MiB(with commit:317000b926b07c). >>>>>>>>> Due to the large MR pool, the max no.of iSER connections(On >>> one variant >>>>>>>>> of Chelsio cards) came down to 9, before it was 250. >>>>>>>>> NVMe-RDMA target also uses 1MiB max IO size. >>>>>>>> Max, remind me what was the point to support 16M? Did this >>> resolve >>>>>>>> an issue?