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=-10.1 required=3.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,MAILING_LIST_MULTI,SIGNED_OFF_BY, SPF_HELO_NONE,SPF_PASS,URIBL_BLOCKED autolearn=unavailable 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 75FA4C43461 for ; Wed, 16 Sep 2020 07:17:33 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by mail.kernel.org (Postfix) with ESMTP id 2FC152076C for ; Wed, 16 Sep 2020 07:17:33 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=default; t=1600240653; bh=lPltz0UA//MmcZWvq3LaaXKDBJM+SO+YnSL4n5jpfn0=; h=Date:From:To:Cc:Subject:References:In-Reply-To:List-ID:From; b=ct2T3LJtHcTXDMYWMiqHPIC3ZzvLttw7S1mM8/wLbTJmOP2YLq5KVsWKj8WecOPAz C7Vz/DpKWv5wp0p2ZFjSLzJSv5MuMj5rIot6p6Q7Jnurh1kYuMnTySL8HBWE9kzvg1 s5SdsxtdH7huZKw22sHxs8QY3P/LlNLAQyedOna8= Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1726387AbgIPHRb (ORCPT ); Wed, 16 Sep 2020 03:17:31 -0400 Received: from mail.kernel.org ([198.145.29.99]:45230 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726149AbgIPHRZ (ORCPT ); Wed, 16 Sep 2020 03:17:25 -0400 Received: from localhost (unknown [213.57.247.131]) (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 BCB262076B; Wed, 16 Sep 2020 07:17:24 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=default; t=1600240645; bh=lPltz0UA//MmcZWvq3LaaXKDBJM+SO+YnSL4n5jpfn0=; h=Date:From:To:Cc:Subject:References:In-Reply-To:From; b=lMzTtvuFxSoJYvZ7IP4WZyqQbx/dcPRXdz6RQZjc+n2IF/YMhxHfBLeuuLUwnFqNc LFmDCGuU2WxJtVTymLWNQfl8d5IK4RCWU39i4wANX5kBlTQY/o+yEfrUE0/PBaZQH8 hJ0Do36tvsGC6pcl73QrN9mGhPrcESKmBbAOU3v8= Date: Wed, 16 Sep 2020 10:17:21 +0300 From: Leon Romanovsky To: Christoph Hellwig Cc: Doug Ledford , Jason Gunthorpe , Maor Gottlieb , linux-kernel@vger.kernel.org, linux-rdma@vger.kernel.org Subject: Re: [PATCH rdma-next v1 1/4] lib/scatterlist: Refactor sg_alloc_table_from_pages Message-ID: <20200916071721.GC486552@unreal> References: <20200910134259.1304543-1-leon@kernel.org> <20200910134259.1304543-2-leon@kernel.org> <20200915161643.GA24320@lst.de> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20200915161643.GA24320@lst.de> Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Tue, Sep 15, 2020 at 06:16:43PM +0200, Christoph Hellwig wrote: > On Thu, Sep 10, 2020 at 04:42:56PM +0300, Leon Romanovsky wrote: > > From: Maor Gottlieb > > > > Currently, sg_alloc_table_from_pages doesn't support dynamic chaining of > > SG entries. Therefore it requires from user to allocate all the pages in > > advance and hold them in a large buffer. Such a buffer consumes a lot of > > temporary memory in HPC systems which do a very large memory registration. > > > > The next patches introduce API for dynamically allocation from pages and > > it requires us to do the following: > > * Extract the code to alloc_from_pages_common. > > * Change the build of the table to iterate on the chunks and not on the > > SGEs. It will allow dynamic allocation of more SGEs. > > > > Since sg_alloc_table_from_pages allocate exactly the number of chunks, > > therefore chunks are equal to the number of SG entries. > > > > Signed-off-by: Maor Gottlieb > > Signed-off-by: Leon Romanovsky > > I really don't think this refactoring on its own adds any value, > it just makes reading the rest of the series harder. We expected this type of the comment, but decided to send "splitted" version because it is much easier to squash patches instead of splitting them later. We will squash and resubmit. > > (functionally it looks correct, though) Thanks