Received: by 2002:a05:6358:16cc:b0:ea:6187:17c9 with SMTP id r12csp3207419rwl; Fri, 6 Jan 2023 17:56:38 -0800 (PST) X-Google-Smtp-Source: AMrXdXs2fH9gNkXXz0yfiX2aQvS8v+jQSRhLVLoR0OeGe1gcB35bbkzOD+qJs09qz2mYRQYUN8BV X-Received: by 2002:a17:906:a38f:b0:7c4:f348:3b1f with SMTP id k15-20020a170906a38f00b007c4f3483b1fmr49326688ejz.44.1673056598013; Fri, 06 Jan 2023 17:56:38 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1673056598; cv=none; d=google.com; s=arc-20160816; b=o7bi+FQCdLXQV491kweRnFlnMgFj7ATH/K4lm9aBF1OhlYPZMbNzzBD+8vNw36d66q Wewhvv89uLoGDvwr5pTczzZzafGT/QZ4IVVMen9En4dryWFGfkXkANnspMTTNgR9j6x2 mLIIi/g2VgRO8aYau1DjmkFZfhGrs8RAIAImMNCx5gKozikvFCZ/hcQynuX0uxtRPoNX cuBRmW2PV1N8Ln2T6XaKxHItL1AnzmLl3VG8Bky4Ir/WSXlyWBzOP0VHx/dTR9ZQG0/V 1MOySB18MR0dDtXxosCQp8uIiRkBS7Ln7BZmCzUCrI5trCEJFUKmBj5qAVjfh8kWF1GG YpQQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:in-reply-to:content-disposition:mime-version :references:message-id:subject:cc:to:from:date:dkim-signature; bh=iUFnnXUqgMwIg2qA00uRPnlekCgES3Ipud2o4OQ0dCQ=; b=nv0OU3DCqqW2rteRUMUXBW2F6M1T4qMk1mXksgs9kTKIwdZfBqyQ6uAJlujUbaDIqJ JZV8055eKUzW486nBw6k6TqHmaZr9ypR7Gvz+njlBst6rRgbo5lMgp0OWJsMBngn2A9u cdRcyrBuOa1hDE0iSRrExlKJfAs8Dhv8QOdad/to2d9SsJgnczTewS8ccjrVglS1Y5mg EJAvjsQEyUdCIewrsaf5+SGQb5iZ3TWnasNXF7jLGZ3+TZa4iM7+/Z0rCzBMmDqi9qsb dwXg9C6s/GEUUlo0/stN93GriUGhceO4kd5EgoP9Cr2zlV3zdW+P/+CdHAJZjT5Y/usR KwIQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@infradead.org header.s=casper.20170209 header.b=PZfCfbmC; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id xh7-20020a170906da8700b0077fc66b581esi2877973ejb.688.2023.01.06.17.56.25; Fri, 06 Jan 2023 17:56:37 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) client-ip=2620:137:e000::1:20; Authentication-Results: mx.google.com; dkim=pass header.i=@infradead.org header.s=casper.20170209 header.b=PZfCfbmC; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S231394AbjAGBbD (ORCPT + 55 others); Fri, 6 Jan 2023 20:31:03 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:42756 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229751AbjAGBbB (ORCPT ); Fri, 6 Jan 2023 20:31:01 -0500 Received: from casper.infradead.org (casper.infradead.org [IPv6:2001:8b0:10b:1236::1]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id E31806699E for ; Fri, 6 Jan 2023 17:30:58 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=infradead.org; s=casper.20170209; h=In-Reply-To:Content-Type:MIME-Version: References:Message-ID:Subject:Cc:To:From:Date:Sender:Reply-To: Content-Transfer-Encoding:Content-ID:Content-Description; bh=iUFnnXUqgMwIg2qA00uRPnlekCgES3Ipud2o4OQ0dCQ=; b=PZfCfbmCnVy4+gQSFnFUcJt1rB z/1suDbY3soWCF+/jGKRCigg9n5MToaGpmfusJOKoloSbH1q0mQmDkPoaMbAXIDAIYLWhfnv0SgFd kJDFqJ/YxFRS14jjuTSDAdMj6nGUpyy6EsuFa84bQPnvNUDGyFE8KzVzA/Q7v4yLGAspw9EJ+M63R b1G1TGHL3wScfi3nhgbE3U/EU02CgoPXgXGCqwdDCONtJVc2uQZsGUi3+je3ocwRPMzJXz6z7YGiy gOvRpiljOwSeWIzzmD1QoK6toPMJZipQDY6zj+TmIVyhVCj2k+zUhJpSHFFxaIntC4F4afVArzp6k kvfXRDuA==; Received: from willy by casper.infradead.org with local (Exim 4.94.2 #2 (Red Hat Linux)) id 1pDy32-000AF3-GX; Sat, 07 Jan 2023 01:31:00 +0000 Date: Sat, 7 Jan 2023 01:31:00 +0000 From: Matthew Wilcox To: Mike Kravetz Cc: Sidhartha Kumar , linux-kernel@vger.kernel.org, linux-mm@kvack.org, akpm@linux-foundation.org, songmuchun@bytedance.com, tsahu@linux.ibm.com, jhubbard@nvidia.com Subject: Re: [PATCH mm-unstable 8/8] mm/hugetlb: convert demote_free_huge_page to folios Message-ID: References: <20230103191340.116536-1-sidhartha.kumar@oracle.com> <20230103191340.116536-9-sidhartha.kumar@oracle.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: X-Spam-Status: No, score=-4.4 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,RCVD_IN_DNSWL_MED,SPF_HELO_NONE, SPF_NONE autolearn=ham autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lindbergh.monkeyblade.net Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Fri, Jan 06, 2023 at 05:11:36PM -0800, Mike Kravetz wrote: > On 01/03/23 13:13, Sidhartha Kumar wrote: > > @@ -3477,15 +3477,15 @@ static int demote_free_huge_page(struct hstate *h, struct page *page) > > mutex_lock(&target_hstate->resize_lock); > > for (i = 0; i < pages_per_huge_page(h); > > i += pages_per_huge_page(target_hstate)) { > > - subpage = nth_page(page, i); > > - folio = page_folio(subpage); > > + subpage = folio_page(folio, i); > > + subfolio = page_folio(subpage); > > No problems with the code, but I am not in love with the name subfolio. > I know it is patterned after 'subpage'. For better or worse, the term > subpage is used throughout the kernel. This would be the first usage of > the term 'subfolio'. > > Matthew do you have any comments on the naming? It is local to hugetlb, > but I would hate to see use of the term subfolio based on its introduction > here. I'm really not a fan of it either. I intended to dive into this patch and understand the function it's modifying, in the hopes of suggesting a better name and/or method. Since I haven't done that yet, maybe "new" or "dest" names work?