Received: by 2002:a05:7412:b995:b0:f9:9502:5bb8 with SMTP id it21csp2675141rdb; Tue, 26 Dec 2023 00:52:17 -0800 (PST) X-Google-Smtp-Source: AGHT+IGjFjoh5TzgGnicFEHWkYAuqYMtLenhIiARukESmLeW107TlKQevNfoGdLfyTjCuccMGfmY X-Received: by 2002:a05:620a:14b3:b0:77e:fba3:4f2a with SMTP id x19-20020a05620a14b300b0077efba34f2amr7158060qkj.128.1703580736943; Tue, 26 Dec 2023 00:52:16 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1703580736; cv=none; d=google.com; s=arc-20160816; b=WzRgfsxqq9lzWSu/Mrn3akVv/gq4i8fSGAcQK05hLlWTCLwFF8ql3sbAqTnq80TztY x3eke9jOp/+o/uVW3WxaJQWKru7IiyPKpfAmDc+XkL9Lyz56+S5XWmAzJ/IyE+iJiFJU i1ewPLlMHN3k4kH4rljoRtrTTkRZdpvo1FpgS/2vRmMh/sb1MHRMiWJ/XLusEklx6nqt SFcdLaYuM2yK01P6sJhfwQ06GiD7+F5DStAwAMYb0S2v7wILFWL7I+ZNGn0DyTSsyBEd be+6WllXSIyFWGW3AJEMjsL0LbCpwpKNRXaNPFGTgt9vOVjarYx1m09Y4l7vxN+8O014 ofJQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=in-reply-to:content-disposition:mime-version:list-unsubscribe :list-subscribe:list-id:precedence:references:message-id:subject:cc :to:from:date:dkim-signature; bh=a9d/oEbwkxVicJ2uM8TZtFpJtywgY2J49uSR23VgZKw=; fh=DQ4iYRSMLAEi5vZHJLJxXHYGayqB3vG83MXII+z0OHs=; b=DeU68xMVj29PSC60I9iIYLJPkzK9qaCYYNgZ8b1XaEtySTYtLoGzr7rJ5cr4wDlG/S /T2FAx1Hw80nSCypf7zMAFj9iWyr2dju04FtVsFZYp27/YoRktMIFKoswp/scAVjWtpU sA20GnX7u581u3G7xH6FnNXPv1xatuN/wfNrIKkkYfZkvtPRuZmFg/V6Z2DExX902p5F vayM1HKN35GNhnsLe6eszi1NO0i1HFjqbjVK9uy2Q1g5TOpcaskixN5lY31WH1LOAY1z tDg+jtpxXuWSlU/xY0SJV286SopeHSjYMD4E8VKJNxKkmlxF+aupwfk6GVB6nAJBpX2u 6zow== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b=IDU5W7E2; spf=pass (google.com: domain of linux-kernel+bounces-11422-linux.lists.archive=gmail.com@vger.kernel.org designates 147.75.199.223 as permitted sender) smtp.mailfrom="linux-kernel+bounces-11422-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Return-Path: Received: from ny.mirrors.kernel.org (ny.mirrors.kernel.org. [147.75.199.223]) by mx.google.com with ESMTPS id l17-20020a05620a28d100b0077419b27787si12790453qkp.177.2023.12.26.00.52.16 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 26 Dec 2023 00:52:16 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel+bounces-11422-linux.lists.archive=gmail.com@vger.kernel.org designates 147.75.199.223 as permitted sender) client-ip=147.75.199.223; Authentication-Results: mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b=IDU5W7E2; spf=pass (google.com: domain of linux-kernel+bounces-11422-linux.lists.archive=gmail.com@vger.kernel.org designates 147.75.199.223 as permitted sender) smtp.mailfrom="linux-kernel+bounces-11422-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Received: from smtp.subspace.kernel.org (wormhole.subspace.kernel.org [52.25.139.140]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by ny.mirrors.kernel.org (Postfix) with ESMTPS id B074C1C21D5E for ; Tue, 26 Dec 2023 08:52:16 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id 608B44CB58; Tue, 26 Dec 2023 08:52:08 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.b="IDU5W7E2" X-Original-To: linux-kernel@vger.kernel.org Received: from smtp.kernel.org (aws-us-west-2-korg-mail-1.web.codeaurora.org [10.30.226.201]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 8D0AD4CB50; Tue, 26 Dec 2023 08:52:07 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id 6811EC433C8; Tue, 26 Dec 2023 08:52:06 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1703580727; bh=jyG0jhzOfKmBvftJ+7E6X31X6Ev7kNw+BtFt0ToPtnc=; h=Date:From:To:Cc:Subject:References:In-Reply-To:From; b=IDU5W7E2N4N4NQG86OOkiM7s+1iPPVogKeFdF+UOvMB2HMkI+kxzAgo7uuJnuEUNY Yuwy5ezW0YJh9DGqe9eVJXgqKSr7PRtWmicAU4Yx9uM6YFM8g8T2LXI1CoKfm6kYTb GPgfwd6COccFMtktf0sMKRAJXBpFYhygX4jNXHvPY+2EaVgln8MnewAUdjzQqJ8ASs pgZzxmC7UaPlPAngPcKWuFh5NHiFvEPMlJsHpIPVx24HoizMNyuL3pwcOLAgx7AobO V27t/lLLZDL5saDDXSdRzgdE6NV4da+90G1K2AbVWNIt7OS/RjooYtgbGBUGGTIXEO UNzqPGNbC617g== Date: Tue, 26 Dec 2023 10:52:02 +0200 From: Leon Romanovsky To: Junxian Huang Cc: jgg@ziepe.ca, linux-rdma@vger.kernel.org, linuxarm@huawei.com, linux-kernel@vger.kernel.org Subject: Re: [PATCH for-next 4/6] RDMA/hns: Support flexible pagesize Message-ID: <20231226085202.GA13350@unreal> References: <20231225075330.4116470-1-huangjunxian6@hisilicon.com> <20231225075330.4116470-5-huangjunxian6@hisilicon.com> Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20231225075330.4116470-5-huangjunxian6@hisilicon.com> On Mon, Dec 25, 2023 at 03:53:28PM +0800, Junxian Huang wrote: > From: Chengchang Tang > > In the current implementation, a fixed page size is used to > configure the PBL, which is not flexible enough and is not > conducive to the performance of the HW. > > Signed-off-by: Chengchang Tang > Signed-off-by: Junxian Huang > --- > drivers/infiniband/hw/hns/hns_roce_alloc.c | 6 - > drivers/infiniband/hw/hns/hns_roce_device.h | 9 ++ > drivers/infiniband/hw/hns/hns_roce_mr.c | 168 +++++++++++++++----- > 3 files changed, 139 insertions(+), 44 deletions(-) I'm wonder if the ib_umem_find_best_pgsz() API should be used instead. What is missing there? Thanks