From patchwork Tue Nov 29 22:50:31 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Sidhartha Kumar X-Patchwork-Id: 27525 Return-Path: Delivered-To: ouuuleilei@gmail.com Received: by 2002:adf:f944:0:0:0:0:0 with SMTP id q4csp607523wrr; Tue, 29 Nov 2022 14:52:35 -0800 (PST) X-Google-Smtp-Source: AA0mqf5DuuNDHYGLDmO22J9wI0XgbFkxt7GZsZGU/hX8wqL+Xhr64TVkZUq2Z/UMACK4mu5SRYw0 X-Received: by 2002:a05:6a00:2883:b0:572:7b49:4f47 with SMTP id ch3-20020a056a00288300b005727b494f47mr41601858pfb.16.1669762355287; Tue, 29 Nov 2022 14:52:35 -0800 (PST) ARC-Seal: i=2; a=rsa-sha256; t=1669762355; cv=pass; d=google.com; s=arc-20160816; b=x4E/wOCOof8SREWrA92+0B3R11N2Wu9HlMNpCd3IrAxp4G0oz9W9pTtVO5H84tCxHy vFUOgQ4IqH3iwRupyZzpxRYSP8Oc1ohoEA/rdBaMcMZAjh7sXTtZSeFwYMCG01Gy3Hn7 Z5RDN7tPYt9ihGMmAvRmeiprv+jVYD82pxc7WUn6WGjVoLuEVleXutlYXXGRCDXXATE1 7nkFxw45Si+/25W1jBTqkyMO3wJ/R91uGHszYa70R9hSnpWqlhHJEZuXLI/dZNglZfZl SNhhqT8M2816BPqVlwexnfDeTCgts/dqXgSJtothvoDzZPz8Khvd06rd9AJGE2mI74F6 bfEQ== ARC-Message-Signature: i=2; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:mime-version:content-transfer-encoding :references:in-reply-to:message-id:date:subject:cc:to:from :dkim-signature:dkim-signature; bh=RHKiiVc28hJsMCo6RKUzQfHyZDcgMk6bAgu3H8/3i84=; b=aM7UzolXvPIdLPFuHH7m5yWd1TToH2b1yztheOY2mR4Np78CCzKDV+btwQvF7Gidsg y9WbtdL0e/hhEDOegBNiy+yLJcgEKesELeZO7a63pp6RLcoUOtnXDlt4gwX85+yy0uIb Pp97YnfJ2OTeWAjS8QPNTasxsr3fPUDeSd8K7xpgLx7XW8rJJxIbflLLcym339DeZ89y 5MGUScVtsZ4D1/OICq8TdUiedhDdLR403DUy7aHM+IPQeGWzuxt7x7iZqtR9q5rFINVi GYpeWUTQRqia8sxqRdE8n/lyMGqExO8ueoUrxu99qIjwaDfRueM+kECFZOwUwExone6i LF8w== ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@oracle.com header.s=corp-2022-7-12 header.b=r9w3dbG7; dkim=pass header.i=@oracle.onmicrosoft.com header.s=selector2-oracle-onmicrosoft-com header.b=OohiyS2o; arc=pass (i=1 spf=pass spfdomain=oracle.com dkim=pass dkdomain=oracle.com dmarc=pass fromdomain=oracle.com); 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; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=oracle.com Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id g30-20020a63201e000000b00476b6fa2963si15673908pgg.599.2022.11.29.14.52.22; Tue, 29 Nov 2022 14:52:35 -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=@oracle.com header.s=corp-2022-7-12 header.b=r9w3dbG7; dkim=pass header.i=@oracle.onmicrosoft.com header.s=selector2-oracle-onmicrosoft-com header.b=OohiyS2o; arc=pass (i=1 spf=pass spfdomain=oracle.com dkim=pass dkdomain=oracle.com dmarc=pass fromdomain=oracle.com); 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; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=oracle.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S236977AbiK2WvZ (ORCPT + 99 others); Tue, 29 Nov 2022 17:51:25 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:38442 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S236359AbiK2WvL (ORCPT ); Tue, 29 Nov 2022 17:51:11 -0500 Received: from mx0b-00069f02.pphosted.com (mx0b-00069f02.pphosted.com [205.220.177.32]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 488B72339E for ; Tue, 29 Nov 2022 14:51:09 -0800 (PST) Received: from pps.filterd (m0246631.ppops.net [127.0.0.1]) by mx0b-00069f02.pphosted.com (8.17.1.19/8.17.1.19) with ESMTP id 2ATMDZ9W028263; Tue, 29 Nov 2022 22:50:49 GMT DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=oracle.com; h=from : to : cc : subject : date : message-id : in-reply-to : references : content-transfer-encoding : content-type : mime-version; s=corp-2022-7-12; bh=RHKiiVc28hJsMCo6RKUzQfHyZDcgMk6bAgu3H8/3i84=; b=r9w3dbG7TSR6TN2fb/vclzw35RakdaIy4611qheWx9441QKyjPMeaPrR/LeQM+oMkLoT G4r58/W5ps/K0U+fguXW8DelfdHxwJ78Uv8X/unLBGLdmPoxQWK/SV8iFIPwz54rYhjh PpLa0JM7lVi80OXQWCe4eWqwnSHX2MPxZ1+ThA1/zmWfUxSBoqyK5QgssHqkCRfgcd70 26SnJavydXt6gb+tkc0jMGhAOmm/xh0sfDAjQHB53qrjNk6PK44XP/QUbyqAhi7M7Fyw T/jOXCzfDLNmbBpUiJHwG6eZh8xiIUK/WZ49flDMG9vg8BApgGmZ/09lYLtUBTXmTK41 9g== Received: from iadpaimrmta02.imrmtpd1.prodappiadaev1.oraclevcn.com (iadpaimrmta02.appoci.oracle.com [147.154.18.20]) by mx0b-00069f02.pphosted.com (PPS) with ESMTPS id 3m39k2rh7x-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=OK); Tue, 29 Nov 2022 22:50:48 +0000 Received: from pps.filterd (iadpaimrmta02.imrmtpd1.prodappiadaev1.oraclevcn.com [127.0.0.1]) by iadpaimrmta02.imrmtpd1.prodappiadaev1.oraclevcn.com (8.17.1.5/8.17.1.5) with ESMTP id 2ATLsMgu026761; Tue, 29 Nov 2022 22:50:48 GMT Received: from nam11-dm6-obe.outbound.protection.outlook.com (mail-dm6nam11lp2168.outbound.protection.outlook.com [104.47.57.168]) by iadpaimrmta02.imrmtpd1.prodappiadaev1.oraclevcn.com (PPS) with ESMTPS id 3m3c1w6781-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=OK); Tue, 29 Nov 2022 22:50:48 +0000 ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=F8unrmBFWsO7tmLUWe6b4AoRtv8rnUOfYFnZeUM7MhPRS0MadDp130GZ8ZzdByqBDeGeprX17gbXTYCdRV1Hinn4Mh3jICNInxSbzDWyNbltss1QDe5VO1PxSpkyXgvlcT465kPbt9L+bgnn0Oa9L+R1KJbZqAFKAg/+sHuWdW2FUP+/EdAfYPaLllbqGSHtYA6FQ7oj7lYo2SEgjcuYJgUV8kRJLDpX3BiympAQxXLnvue/7HDO0gKtdXoCT4J6Qfb7Npy7LOUdV3Fkx38R2uczIlCogGjV1BvLjprLuSrWQhFlK63TeiYRegnlLxCcjlqMq/ERKuRITmUADTAbtQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=microsoft.com; s=arcselector9901; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-AntiSpam-MessageData-ChunkCount:X-MS-Exchange-AntiSpam-MessageData-0:X-MS-Exchange-AntiSpam-MessageData-1; bh=RHKiiVc28hJsMCo6RKUzQfHyZDcgMk6bAgu3H8/3i84=; b=eknpWuFzjTFYdCk+wJBcsKdzM4BOLtoveu5JMCwqDjtj1wsM184VZo73SPn6Tce+2kHDRlSyev7N10C9lB8igKIso9lynxBygpjzCZqhvew3Idw1fRzed8IGDMPnGLYh3IDEatcUnU46hp+iVCauZ19L+BRlAiRURV0342mCFBUsQMcMaAovyOcFEu5KqZolGohGCEKnd0X7WAtJwW1uo73mEBIYWWwaQF4GFZi63fcvusXIdiFpWnIhS8ZhFxF7v0iZ2KQpcBfn7POqEWiI/8ZH755XR5cFBzXeeSCQ4w6bchsu3RS2C7To80sUzONpgSJqPhaBdEKdbDJmyaorBg== ARC-Authentication-Results: i=1; mx.microsoft.com 1; spf=pass smtp.mailfrom=oracle.com; dmarc=pass action=none header.from=oracle.com; dkim=pass header.d=oracle.com; arc=none DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=oracle.onmicrosoft.com; s=selector2-oracle-onmicrosoft-com; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=RHKiiVc28hJsMCo6RKUzQfHyZDcgMk6bAgu3H8/3i84=; b=OohiyS2oUOOC5NoC8LxmlyASspANHmnoiDbJOXfyCwUzSzh1HM2XpBuKdNSuPAOnR9wIuH6D4plxqVyqgY9R/zlroLKKTXk+qWrTeaLiOTV94Og6JLlcDJGmIDAtX4Pm/sLXOFnJmLssKO2UMWtdQ84trEEqHrXRjNA6XcpjS6U= Received: from CH0PR10MB5113.namprd10.prod.outlook.com (2603:10b6:610:c9::8) by CO6PR10MB5586.namprd10.prod.outlook.com (2603:10b6:303:145::21) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.5857.23; Tue, 29 Nov 2022 22:50:45 +0000 Received: from CH0PR10MB5113.namprd10.prod.outlook.com ([fe80::3702:7db0:8917:9954]) by CH0PR10MB5113.namprd10.prod.outlook.com ([fe80::3702:7db0:8917:9954%5]) with mapi id 15.20.5857.023; Tue, 29 Nov 2022 22:50:45 +0000 From: Sidhartha Kumar To: linux-kernel@vger.kernel.org, linux-mm@kvack.org Cc: akpm@linux-foundation.org, songmuchun@bytedance.com, mike.kravetz@oracle.com, willy@infradead.org, almasrymina@google.com, linmiaohe@huawei.com, hughd@google.com, tsahu@linux.ibm.com, jhubbard@nvidia.com, david@redhat.com, Sidhartha Kumar Subject: [PATCH mm-unstable v5 02/10] mm/hugetlb: convert destroy_compound_gigantic_page() to folios Date: Tue, 29 Nov 2022 14:50:31 -0800 Message-Id: <20221129225039.82257-3-sidhartha.kumar@oracle.com> X-Mailer: git-send-email 2.38.1 In-Reply-To: <20221129225039.82257-1-sidhartha.kumar@oracle.com> References: <20221129225039.82257-1-sidhartha.kumar@oracle.com> X-ClientProxiedBy: CH2PR11CA0027.namprd11.prod.outlook.com (2603:10b6:610:54::37) To CH0PR10MB5113.namprd10.prod.outlook.com (2603:10b6:610:c9::8) MIME-Version: 1.0 X-MS-PublicTrafficType: Email X-MS-TrafficTypeDiagnostic: CH0PR10MB5113:EE_|CO6PR10MB5586:EE_ X-MS-Office365-Filtering-Correlation-Id: dc35281e-6164-4698-3f7b-08dad25c2682 X-MS-Exchange-SenderADCheck: 1 X-MS-Exchange-AntiSpam-Relay: 0 X-Microsoft-Antispam: BCL:0; X-Microsoft-Antispam-Message-Info: wOIcUtWIJX3MsRm8fNEE6PdjTj6JLOMkZffp2k9N0DHxVdhQtgZ7aaLRtX/qY2W41CTO9DOidzkAb/FQSa237mBAVA1leKkXfn4ca6Ex3OFij4XpU8Oeu6UgOlrZX5qPP/b8W5eCYSvnOqnCd2pL/ADq7J/BtVUDeJ/snfW88ptjoWS5PtV2OJyKjnNKpf5wFj36NllfnutXvIWr/7moEU3/HwmGbGY6wmQV+K5EwXts7keWikc/A0qJ7WaDglEaDxHB8i4SgDYqOW45LRwv/hqxR6l7f7bhGyBkQIrBjpVmvFuZJu7R6j8CZpLwdwqPB9/56vm5pDEjuVnDBSELLSUPvNty+ln9OBCYAbjfvXKZ+Az4MutiBXAwMMAX027G4YzQ3fQVo3Ckf0wrQ7zD2WlcY4ZkAtFxXmeh/vFtYp14MpBrJkidAE1Dpep/R4KNQWx+03WK6oI6SNoDbzwlwoRvZcoZMZvChjEGsKlYA4D3efDSe9hGNFtiSZ0RSMB2L2en4A3k+ILKDO7lCZfTR67TplfXlnm3Uv7Xj1Dok14P2ZepXN+XV7ZdOAPtbraT2HpH6sDwIDuxtWkeei2gknZLtnlYaTnOTiAm/d4flEIK7ihEHAjIRJqjDXbSrcmd X-Forefront-Antispam-Report: CIP:255.255.255.255;CTRY:;LANG:en;SCL:1;SRV:;IPV:NLI;SFV:NSPM;H:CH0PR10MB5113.namprd10.prod.outlook.com;PTR:;CAT:NONE;SFS:(13230022)(376002)(346002)(366004)(39860400002)(136003)(396003)(451199015)(2906002)(2616005)(6486002)(186003)(41300700001)(1076003)(478600001)(36756003)(6512007)(86362001)(26005)(7416002)(83380400001)(38100700002)(6506007)(8676002)(66556008)(66476007)(4326008)(6666004)(107886003)(44832011)(316002)(66946007)(5660300002)(8936002);DIR:OUT;SFP:1101; X-MS-Exchange-AntiSpam-MessageData-ChunkCount: 1 X-MS-Exchange-AntiSpam-MessageData-0: 3ek11STNTtbVMFqmcR/u5D8IaLcFZHYMt8cyrUfi7crct5GKPtqh6DT8cD9DHIqZgr8GI3s4TgAjWj+QPybra60J4YhQxhF2heE/gLV6HWg7XgMbw1TQFy8zQFYLG6RqBp/wnG9X9YZ9lGtEr5ubTKrHVzIlMVX09jyFT/ClFZB7kFQ7hcZ1rBDZY3TvBGXet3iGA8ZQI5MtwMRHiRKCdn6de0qMTHdSgU/NNyqxz8MfJ7FooSsT341atIb66UfpectN+xwxhaAtaoJQ8p9BtmpP9Wu5KGcq2HD+jR4u+46eyOPZdZ3zNAGQTEGDpEa2nf3RhET5zY231huiICFYZwPG55YWs0daVTwRdcg5Y56vpTgdgl9ffgDOVAF+YvY0CzCvODEJ/35qfDwj4K41qXAkNWOafNV/G6NSokMzSqjGFptISoMWSxgjufBlfZw0dBQujQc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fQivCNKoYwj8+bLb5mrWuroiXEPuUccow2fjlVtmrMtsBGZkmq8HhkrlHIuEbGaIHgqAU/VrdrjONKwo0f1y+cUnYc5pXqOg9HvO2BJsiiSgejG56lidofIXMLlKg4EC1lBnTo6Bln+4fWWn4de16gVMr7B8XBA3kbS/JsRA7wghh81JYLJsYJF3tJVQZKSZLcVll1mwVa1SNNg0rqxaqso1LWCHCmUhW6r5q9+6nWvL1s= X-OriginatorOrg: oracle.com X-MS-Exchange-CrossTenant-Network-Message-Id: dc35281e-6164-4698-3f7b-08dad25c2682 X-MS-Exchange-CrossTenant-AuthSource: CH0PR10MB5113.namprd10.prod.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Internal X-MS-Exchange-CrossTenant-OriginalArrivalTime: 29 Nov 2022 22:50:45.3887 (UTC) X-MS-Exchange-CrossTenant-FromEntityHeader: Hosted X-MS-Exchange-CrossTenant-Id: 4e2c6054-71cb-48f1-bd6c-3a9705aca71b X-MS-Exchange-CrossTenant-MailboxType: HOSTED X-MS-Exchange-CrossTenant-UserPrincipalName: XncKkNa/2ATXoXYBUnGmRKfgZhbTNGW75JoxAGfeRe0f2epD+0saNwSyURySTUFPnluKlGZRSKkU5pHZtIanGbyt7kGzkpxjrCB0LWn04FE= X-MS-Exchange-Transport-CrossTenantHeadersStamped: CO6PR10MB5586 X-Proofpoint-Virus-Version: vendor=baseguard engine=ICAP:2.0.219,Aquarius:18.0.895,Hydra:6.0.545,FMLib:17.11.122.1 definitions=2022-11-29_13,2022-11-29_01,2022-06-22_01 X-Proofpoint-Spam-Details: rule=notspam policy=default score=0 spamscore=0 phishscore=0 suspectscore=0 bulkscore=0 adultscore=0 mlxlogscore=999 malwarescore=0 mlxscore=0 classifier=spam adjust=0 reason=mlx scancount=1 engine=8.12.0-2210170000 definitions=main-2211290137 X-Proofpoint-GUID: 1eo6L1hS93cB-ftH5VCKollboVXuz5gg X-Proofpoint-ORIG-GUID: 1eo6L1hS93cB-ftH5VCKollboVXuz5gg X-Spam-Status: No, score=-2.8 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,RCVD_IN_DNSWL_LOW, RCVD_IN_MSPIKE_H2,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 X-getmail-retrieved-from-mailbox: =?utf-8?q?INBOX?= X-GMAIL-THRID: =?utf-8?q?1750872731546704258?= X-GMAIL-MSGID: =?utf-8?q?1750872731546704258?= Convert page operations within __destroy_compound_gigantic_page() to the corresponding folio operations. Signed-off-by: Sidhartha Kumar Reviewed-by: Mike Kravetz --- mm/hugetlb.c | 43 +++++++++++++++++++++---------------------- 1 file changed, 21 insertions(+), 22 deletions(-) diff --git a/mm/hugetlb.c b/mm/hugetlb.c index 6390de8975c5..f6f791675c38 100644 --- a/mm/hugetlb.c +++ b/mm/hugetlb.c @@ -1325,43 +1325,40 @@ static int hstate_next_node_to_free(struct hstate *h, nodemask_t *nodes_allowed) nr_nodes--) /* used to demote non-gigantic_huge pages as well */ -static void __destroy_compound_gigantic_page(struct page *page, +static void __destroy_compound_gigantic_folio(struct folio *folio, unsigned int order, bool demote) { int i; int nr_pages = 1 << order; struct page *p; - atomic_set(compound_mapcount_ptr(page), 0); - atomic_set(subpages_mapcount_ptr(page), 0); - atomic_set(compound_pincount_ptr(page), 0); + atomic_set(folio_mapcount_ptr(folio), 0); + atomic_set(folio_subpages_mapcount_ptr(folio), 0); + atomic_set(folio_pincount_ptr(folio), 0); for (i = 1; i < nr_pages; i++) { - p = nth_page(page, i); + p = folio_page(folio, i); p->mapping = NULL; clear_compound_head(p); if (!demote) set_page_refcounted(p); } - set_compound_order(page, 0); -#ifdef CONFIG_64BIT - page[1].compound_nr = 0; -#endif - __ClearPageHead(page); + folio_set_compound_order(folio, 0); + __folio_clear_head(folio); } -static void destroy_compound_hugetlb_page_for_demote(struct page *page, +static void destroy_compound_hugetlb_folio_for_demote(struct folio *folio, unsigned int order) { - __destroy_compound_gigantic_page(page, order, true); + __destroy_compound_gigantic_folio(folio, order, true); } #ifdef CONFIG_ARCH_HAS_GIGANTIC_PAGE -static void destroy_compound_gigantic_page(struct page *page, +static void destroy_compound_gigantic_folio(struct folio *folio, unsigned int order) { - __destroy_compound_gigantic_page(page, order, false); + __destroy_compound_gigantic_folio(folio, order, false); } static void free_gigantic_page(struct page *page, unsigned int order) @@ -1430,7 +1427,7 @@ static struct page *alloc_gigantic_page(struct hstate *h, gfp_t gfp_mask, return NULL; } static inline void free_gigantic_page(struct page *page, unsigned int order) { } -static inline void destroy_compound_gigantic_page(struct page *page, +static inline void destroy_compound_gigantic_folio(struct folio *folio, unsigned int order) { } #endif @@ -1477,8 +1474,8 @@ static void __remove_hugetlb_page(struct hstate *h, struct page *page, * * For gigantic pages set the destructor to the null dtor. This * destructor will never be called. Before freeing the gigantic - * page destroy_compound_gigantic_page will turn the compound page - * into a simple group of pages. After this the destructor does not + * page destroy_compound_gigantic_folio will turn the folio into a + * simple group of pages. After this the destructor does not * apply. * * This handles the case where more than one ref is held when and @@ -1559,6 +1556,7 @@ static void add_hugetlb_page(struct hstate *h, struct page *page, static void __update_and_free_page(struct hstate *h, struct page *page) { int i; + struct folio *folio = page_folio(page); struct page *subpage; if (hstate_is_gigantic(h) && !gigantic_page_runtime_supported()) @@ -1587,8 +1585,8 @@ static void __update_and_free_page(struct hstate *h, struct page *page) * Move PageHWPoison flag from head page to the raw error pages, * which makes any healthy subpages reusable. */ - if (unlikely(PageHWPoison(page))) - hugetlb_clear_page_hwpoison(page); + if (unlikely(folio_test_hwpoison(folio))) + hugetlb_clear_page_hwpoison(&folio->page); for (i = 0; i < pages_per_huge_page(h); i++) { subpage = nth_page(page, i); @@ -1604,7 +1602,7 @@ static void __update_and_free_page(struct hstate *h, struct page *page) */ if (hstate_is_gigantic(h) || hugetlb_cma_page(page, huge_page_order(h))) { - destroy_compound_gigantic_page(page, huge_page_order(h)); + destroy_compound_gigantic_folio(folio, huge_page_order(h)); free_gigantic_page(page, huge_page_order(h)); } else { __free_pages(page, huge_page_order(h)); @@ -3437,6 +3435,7 @@ static int demote_free_huge_page(struct hstate *h, struct page *page) { int i, nid = page_to_nid(page); struct hstate *target_hstate; + struct folio *folio = page_folio(page); struct page *subpage; int rc = 0; @@ -3455,10 +3454,10 @@ static int demote_free_huge_page(struct hstate *h, struct page *page) } /* - * Use destroy_compound_hugetlb_page_for_demote for all huge page + * Use destroy_compound_hugetlb_folio_for_demote for all huge page * sizes as it will not ref count pages. */ - destroy_compound_hugetlb_page_for_demote(page, huge_page_order(h)); + destroy_compound_hugetlb_folio_for_demote(folio, huge_page_order(h)); /* * Taking target hstate mutex synchronizes with set_max_huge_pages.