Received: by 2002:a05:6358:a55:b0:ec:fcf4:3ecf with SMTP id 21csp2143311rwb; Thu, 19 Jan 2023 21:56:06 -0800 (PST) X-Google-Smtp-Source: AMrXdXuyY7gToorgtPe/wxiIeasCc4INZLDXr3ExsEYEJfzKMwNI6gjfqLurcicgb/pbvVECUgaV X-Received: by 2002:a17:90a:d384:b0:229:a2:a273 with SMTP id q4-20020a17090ad38400b0022900a2a273mr11571629pju.2.1674194166107; Thu, 19 Jan 2023 21:56:06 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1674194166; cv=none; d=google.com; s=arc-20160816; b=W1wBUKjaMbZHjabDtKopQ9KCP08n4PPvehNo2aUcacI6XGiSzpwGwYFbQUfe+TRXMn Ul2VfAg3qd1FbXb4fdXn2JUOWnk36SZpAT5RJWwLS49odbeE4I2xUyELANXJTfj8rsXG iN+vo9ji4AyEgAyTmyRZtSQTPPuD6+WKxJRcn5OLcEbdz464zM3zoAnpwzrmIG+tJyAf DbCM7FOAlPo8urSJuyqH4bWP/tooN3fca+ZyqYvs0C2AEJPIhM1whKQoLpoKz0d9NHdQ sowkwFRrvpBe1FKDG3TzjQ0jhc8RpF5rAc4El0AFOfGWjUa1bD8Fn8hRcnOOCaC2Zriw bzyw== 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=HRjwOCVzwM/JW0nRSbGXBKRTYmFcFNAcwf5tRy6Wjq8=; b=WKWBdNjaIUJpfLVkVrCdJlPUhdkVJrFo1j/lkrvSE5C+R8YG9CWRjY7SRuAhWAu4YK uqAqo2cLjch9sjoR56z7NrN4W/bfbVUh1XjRLi3o2rFaURzenbwzIIBN3zCWDzmm7FJy QnXtLwzjP9BCs6UAvRyyUvptmqq69lFC3fDl8IiBdKsATSJTb6UXqGd2OUo1A7ZB2j88 NOpO4B0nuzWH90ZBr2vLaMFlpdtgyG6493CQPJRHAVKNgc/dCz2c5RIRBRj6A+1bl5eu 7si6wkvsIUqypsJK/IsHNiLBfPwqDtNaaS91veZGfPJ7SsQokV0ddia1z6sq/j5SpcKg YrVg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@infradead.org header.s=casper.20170209 header.b=ZScI6oZl; 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 x4-20020a17090aa38400b00226646d3605si1404889pjp.58.2023.01.19.21.56.00; Thu, 19 Jan 2023 21:56:06 -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=ZScI6oZl; 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 S231241AbjATFsv (ORCPT + 47 others); Fri, 20 Jan 2023 00:48:51 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:56944 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S231304AbjATFsp (ORCPT ); Fri, 20 Jan 2023 00:48:45 -0500 Received: from casper.infradead.org (casper.infradead.org [IPv6:2001:8b0:10b:1236::1]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 80CD111664 for ; Thu, 19 Jan 2023 21:48:37 -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=HRjwOCVzwM/JW0nRSbGXBKRTYmFcFNAcwf5tRy6Wjq8=; b=ZScI6oZlQ7OMuf2sCUd8I7tW18 LTf13QwNry53D3aVeuvTAMDXP20zG98bna3DYZQKwZhKRBxPGFDj3n5oIMBVqKkqOexJKfedtrfMT RwJ6T3l9A40J7bzI3nh/rkWXqu5QkqJb9jAGPWnOFRvxVWZXfBKMk1QS0AqJchv5WQstfd30k2jSL hQMW2QSwVSC3vHWERzQP2qyIHaccG4KPimx4Qq1R2/dBv4JZdb3LT17Oc3sLFg3EnE0XYx/5Zd3SA QjBZLV76VGJy4VATUcQiun3SY9grv09T50xsz9/zou0N3h6YY2wGcVqRngqHBPD7qGB5fsGBXELzl 3lq72dvA==; Received: from willy by casper.infradead.org with local (Exim 4.94.2 #2 (Red Hat Linux)) id 1pIkGQ-001hrA-Na; Fri, 20 Jan 2023 05:48:35 +0000 Date: Fri, 20 Jan 2023 05:48:34 +0000 From: Matthew Wilcox To: Sidhartha Kumar Cc: linux-kernel@vger.kernel.org, linux-mm@kvack.org, akpm@linux-foundation.org, songmuchun@bytedance.com, mike.kravetz@oracle.com, jhubbard@nvidia.com Subject: Re: [PATCH 3/9] mm/hugetlb: convert putback_active_hugepage to take in a folio Message-ID: References: <20230119211446.54165-1-sidhartha.kumar@oracle.com> <20230119211446.54165-4-sidhartha.kumar@oracle.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20230119211446.54165-4-sidhartha.kumar@oracle.com> 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 Thu, Jan 19, 2023 at 01:14:40PM -0800, Sidhartha Kumar wrote: > -void putback_active_hugepage(struct page *page) > +void putback_active_hugetlb_folio(struct folio *folio) Maybe call this folio_putback_active_hugetlb()? It fits better with folio_putback_lru(). > +++ b/mm/migrate.c > @@ -151,7 +151,7 @@ void putback_movable_pages(struct list_head *l) > > list_for_each_entry_safe(page, page2, l, lru) { > if (unlikely(PageHuge(page))) { > - putback_active_hugepage(page); > + putback_active_hugetlb_folio(page_folio(page)); > continue; > } > list_del(&page->lru); Maybe we need a patch first to convert this loop from an iteration of page->lru to folio->lru to avoid that call to page_folio()?