From patchwork Fri Sep 15 22:15:37 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Mike Kravetz X-Patchwork-Id: 13387781 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from kanga.kvack.org (kanga.kvack.org [205.233.56.17]) by smtp.lore.kernel.org (Postfix) with ESMTP id DF248CD37AF for ; Fri, 15 Sep 2023 22:16:37 +0000 (UTC) Received: by kanga.kvack.org (Postfix) id 7858C6B0384; Fri, 15 Sep 2023 18:16:37 -0400 (EDT) Received: by kanga.kvack.org (Postfix, from userid 40) id 7353C6B0387; Fri, 15 Sep 2023 18:16:37 -0400 (EDT) X-Delivered-To: int-list-linux-mm@kvack.org Received: by kanga.kvack.org (Postfix, from userid 63042) id 53B656B0388; Fri, 15 Sep 2023 18:16:37 -0400 (EDT) X-Delivered-To: linux-mm@kvack.org Received: from relay.hostedemail.com (smtprelay0011.hostedemail.com [216.40.44.11]) by kanga.kvack.org (Postfix) with ESMTP id 432756B0384 for ; Fri, 15 Sep 2023 18:16:37 -0400 (EDT) Received: from smtpin17.hostedemail.com (a10.router.float.18 [10.200.18.1]) by unirelay07.hostedemail.com (Postfix) with ESMTP id 1D7A0160801 for ; Fri, 15 Sep 2023 22:16:37 +0000 (UTC) X-FDA: 81240242034.17.FEC4A68 Received: from mx0a-00069f02.pphosted.com (mx0a-00069f02.pphosted.com [205.220.165.32]) by imf16.hostedemail.com (Postfix) with ESMTP id A138318001B for ; Fri, 15 Sep 2023 22:16:32 +0000 (UTC) Authentication-Results: imf16.hostedemail.com; dkim=pass header.d=oracle.com header.s=corp-2023-03-30 header.b=ly8gISQI; dkim=pass header.d=oracle.onmicrosoft.com header.s=selector2-oracle-onmicrosoft-com header.b=vMj+Us7h; arc=pass ("microsoft.com:s=arcselector9901:i=1"); spf=pass (imf16.hostedemail.com: domain of mike.kravetz@oracle.com designates 205.220.165.32 as permitted sender) smtp.mailfrom=mike.kravetz@oracle.com; dmarc=pass (policy=none) header.from=oracle.com ARC-Message-Signature: i=2; a=rsa-sha256; c=relaxed/relaxed; d=hostedemail.com; s=arc-20220608; t=1694816192; h=from:from:sender:reply-to:subject:subject:date:date: message-id:message-id:to:to:cc:cc:mime-version:mime-version: content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references:dkim-signature; bh=E2k0SQT9AAGQbQtl+bCcx+uvnWZgNmigsOuLewx2GeI=; b=MV8hUOUtQ283j094UuK0JtcG8onstk2nFKdhjJlsyJb8loAVNeN2RlnuwcGRJE0uTC9seb pGHN2LeTFjwFmCF93D1RvIVNtmPK47Xi1HK7+Kg1jIkdJsEi+y0tRJ0aBDDfT9V8HvpZXF b/AwqoBcS46ZKc5tlV9dETlvK+/HyaE= ARC-Seal: i=2; s=arc-20220608; d=hostedemail.com; t=1694816192; a=rsa-sha256; cv=pass; b=NFtNm1woAX6sKqFW2OmQRE08uDj2AlPKoynRNVkVRFrVZWk7UXqXLoVjsPCT/JxzM8e0Xe BOtuC/KQ6Gn2o7pLVmZD66r3NhxA7/8nGrrnKqs/tk5RbasmS/I1XUbYxmD4JOQl5PGwPf sH7adjCIFGt3M7iebFs9fTq2PDHjru4= ARC-Authentication-Results: i=2; imf16.hostedemail.com; dkim=pass header.d=oracle.com header.s=corp-2023-03-30 header.b=ly8gISQI; dkim=pass header.d=oracle.onmicrosoft.com header.s=selector2-oracle-onmicrosoft-com header.b=vMj+Us7h; arc=pass ("microsoft.com:s=arcselector9901:i=1"); spf=pass (imf16.hostedemail.com: domain of mike.kravetz@oracle.com designates 205.220.165.32 as permitted sender) smtp.mailfrom=mike.kravetz@oracle.com; dmarc=pass (policy=none) header.from=oracle.com Received: from pps.filterd (m0246629.ppops.net [127.0.0.1]) by mx0b-00069f02.pphosted.com (8.17.1.19/8.17.1.19) with ESMTP id 38FLuFXh023028; Fri, 15 Sep 2023 22:16:08 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-2023-03-30; bh=E2k0SQT9AAGQbQtl+bCcx+uvnWZgNmigsOuLewx2GeI=; b=ly8gISQIduGECkkwZ06y9RXpS2fA+IIhrOqw4lUgKl+J++zsyGNPSHylboQo6MVd7jfS JxX4kLgg0UJ4m2Dz1kUgfVDAkJQejPJnmLa83bT4nU3V9xTWBCRRDyrAj14Q3FIKUeIA bLvaIrF3VzG4VyN+BgfZYUU+Be7rDtbBGkfgku+pJvdLGDhg6pGCwOJvk2Dk3vlls3nI tk0SBlDY5lcV9G/1fxPHbDImYIkIaY1vTS3lv3DyLUbu3k6enERNNjdLRlPmN2p0xTPS W6ng9Ku7Y5rh2YheOkpveg+C69lSj9Doaw1ZBpK5WxLogTNAXcn4N7Vnl9i9tv3rpoPX sA== Received: from iadpaimrmta01.imrmtpd1.prodappiadaev1.oraclevcn.com (iadpaimrmta01.appoci.oracle.com [130.35.100.223]) by mx0b-00069f02.pphosted.com (PPS) with ESMTPS id 3t2y7n0k4k-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=OK); Fri, 15 Sep 2023 22:16:07 +0000 Received: from pps.filterd (iadpaimrmta01.imrmtpd1.prodappiadaev1.oraclevcn.com [127.0.0.1]) by iadpaimrmta01.imrmtpd1.prodappiadaev1.oraclevcn.com (8.17.1.19/8.17.1.19) with ESMTP id 38FKouGE036194; Fri, 15 Sep 2023 22:16:06 GMT Received: from nam12-dm6-obe.outbound.protection.outlook.com (mail-dm6nam12lp2176.outbound.protection.outlook.com [104.47.59.176]) by iadpaimrmta01.imrmtpd1.prodappiadaev1.oraclevcn.com (PPS) with ESMTPS id 3t0f5gx8vp-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=OK); Fri, 15 Sep 2023 22:16:06 +0000 ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=YSQXZmZt423On9BPQEGFLrZRo6NNTHrdrZFiuBsvLJfzsHYAwY7kWLwqvJFCamIE1I89/jg/t+7IWMrbUhAM3PCCFp6GuSziSlKRUwa7zATka+HdhicXSlZBbSirghcr1IqtubqOE50F6XmXku6PeHr/sxlV88s/XyJ4mnsABydgbEFOAZ2Mq5e/BBqi3TeMGr4cCFKLYv3S7hvVIpmU9GtA9redlW8xsqANcmtF5oYG9upin3rnKqs/WF9S2jz6XH1tAUuqGVxtoH51LZHeGDnewQc1C8g9rgVrxJfMK0oGqu5lxwr76Pn2HgH3/K+dESzHRnaKRIZGoiud7jpNvQ== 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=E2k0SQT9AAGQbQtl+bCcx+uvnWZgNmigsOuLewx2GeI=; b=OCTxwuXW9SwQlCmVR5PlqvQMOgT5YqkfOq60akXMKYAfD0qRu3FStw75grmYl4GUqqrcbbkJyZOPi9a0rW2mx8isCgtghrrQnVIi+QV9Fv5/kiX3OerSv1qv48N7d5OFCBf7kGA4eEsnTMNmfuIXUFQfaZB7ucm6ddZ6AszsJwfACXIoAuEbeA5k+DQSvxzgwruqJ2pTbJql4gpQVHsOjSS9dzUx2AZ40pg6aJr4J2AaR6J05OcL99HCVMJx9FtQ1IgFw9GDwtoh3KCQcrQVkQ189kmdd/IhP2q7FdBG2M3H4gJEVPsjg2wc/uaBqLtOY6sLBP6Qbr/0HYw6/ci1UQ== 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=E2k0SQT9AAGQbQtl+bCcx+uvnWZgNmigsOuLewx2GeI=; b=vMj+Us7hWWunwFmjXN1MK9fNTcUM8YBilbhPWn/SpbU9Zd1fCIdr9h0LfyrpfAxFPNH3Ymf38L2ADjeNSapKldE3tMco7seaLF5Y+WZWjUe9qPGWZFCwbII0kQPfAilgmugQ9knfy7zTT53ykJNbzbpTbduORuyKEw5YqPlWKSI= Received: from BY5PR10MB4196.namprd10.prod.outlook.com (2603:10b6:a03:20d::23) by MW4PR10MB5861.namprd10.prod.outlook.com (2603:10b6:303:180::8) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.6768.34; Fri, 15 Sep 2023 22:16:04 +0000 Received: from BY5PR10MB4196.namprd10.prod.outlook.com ([fe80::c621:12ca:ba40:9054]) by BY5PR10MB4196.namprd10.prod.outlook.com ([fe80::c621:12ca:ba40:9054%5]) with mapi id 15.20.6792.021; Fri, 15 Sep 2023 22:16:04 +0000 From: Mike Kravetz To: linux-mm@kvack.org, linux-kernel@vger.kernel.org Cc: Muchun Song , Joao Martins , Oscar Salvador , David Hildenbrand , Miaohe Lin , David Rientjes , Anshuman Khandual , Naoya Horiguchi , Barry Song , Michal Hocko , Matthew Wilcox , Xiongchun Duan , Andrew Morton , Mike Kravetz , Sidhartha Kumar Subject: [PATCH v3 04/12] hugetlb: Convert remove_pool_huge_page() to remove_pool_hugetlb_folio() Date: Fri, 15 Sep 2023 15:15:37 -0700 Message-ID: <20230915221548.552084-5-mike.kravetz@oracle.com> X-Mailer: git-send-email 2.41.0 In-Reply-To: <20230915221548.552084-1-mike.kravetz@oracle.com> References: <20230915221548.552084-1-mike.kravetz@oracle.com> X-ClientProxiedBy: MW4PR03CA0063.namprd03.prod.outlook.com (2603:10b6:303:b6::8) To BY5PR10MB4196.namprd10.prod.outlook.com (2603:10b6:a03:20d::23) MIME-Version: 1.0 X-MS-PublicTrafficType: Email X-MS-TrafficTypeDiagnostic: BY5PR10MB4196:EE_|MW4PR10MB5861:EE_ X-MS-Office365-Filtering-Correlation-Id: f08e84df-54bd-480b-259c-08dbb63959dd X-MS-Exchange-SenderADCheck: 1 X-MS-Exchange-AntiSpam-Relay: 0 X-Microsoft-Antispam: BCL:0; X-Microsoft-Antispam-Message-Info: W2eFw8VLFi0cIAzJau3IJqeB9mLZzIgxYgmle+RLCtK+a1Op/bCUSayXcuheR3BJjnRTE4iHYaIIS/oSkvhZnmaYlHxNXa3rchzNvhx1rwsS+g3ls7OUy9wKJp4JGHXPuquCPS9tC30nKWYETgfDFqSA+6iIKweNj4ATHew+3cd4BDyDbpZo6BE1WE9ccIHQdxVNdZhSx8GoSIxcQSVvSFGUM3b4kvYFg7gs9VpUkaBY7dbPC5BnaviE9Sw3eR3JP3/8WbBSPHcvTEyu7xHypy3T67QUW1dn/L8Pu0O4TqX+5SrqpHirTJW4zRZuWjOuAPlPCuhVcNVAEnsWx9KnoT3PkTx52TTvTJzp78tf57fqwe5Y1M5jPpBZOWbSLMezqNXI5GScimpLGLr/dlAdB+P63x5mgl3APE8R4/+iibcEKxybF5Q9XHzy98EkqrUaMdkGBZ3lxA7Tl3mIR6pT5RCG9ghmOtpRS36Ku14YEbAhmsABdSI2HpL7GbzDDc65Fhdfg/GnSUC4gg+CqImaW90Wfz+zTe0e7h4nyhjTjZXNyEW6SCwbVElG0pYh2VVTZwwMp5ncoecCFFgGAZuvmv5cHhm/IcTIirVV8U2qfl0= X-Forefront-Antispam-Report: CIP:255.255.255.255;CTRY:;LANG:en;SCL:1;SRV:;IPV:NLI;SFV:NSPM;H:BY5PR10MB4196.namprd10.prod.outlook.com;PTR:;CAT:NONE;SFS:(13230031)(396003)(346002)(39860400002)(366004)(376002)(136003)(451199024)(186009)(1800799009)(44832011)(86362001)(36756003)(83380400001)(2906002)(38100700002)(478600001)(1076003)(2616005)(26005)(107886003)(4326008)(6512007)(41300700001)(5660300002)(6506007)(6486002)(8676002)(6666004)(66556008)(316002)(66946007)(8936002)(7416002)(66476007)(54906003)(14583001);DIR:OUT;SFP:1101; X-MS-Exchange-AntiSpam-MessageData-ChunkCount: 1 X-MS-Exchange-AntiSpam-MessageData-0: gRRLcbcqyPn5YYlMAlDzeplPVRPUeP0zX4vvVRqZpdzcpm+fBE84wXbv32PWevFQ8rtBWtlJZgXhKAmpIQtk5VeXnBl0ttOmjN5OQAZGfiBgomw6c4bOQGFT8lzvYwC8EK+re5TVoQp9m15GRz4j/m2Wuf0/j+WXJEMtfHe/QxXv/u/OJTWXfEEZCIef/VlioFAIKW5FLX3gTPrlY7+K0Anwew45NnSeyIlt8Kkm4bKVuBOvtCu6vw3BLUqDHy5aZhZbScpFCNjn9ARuFjB+ZLY133kluOkN8xgWwscUuOKMGcgr2K17J5t9+Z5pfsQifXuWWC1LwHene69ZAUkP3q7tOUg/auKnV+57QnvbNpLmk76E1KCgD3ZwSKGODm9/qytx5RsAZqaDbp2XRJ+NBGJnsfHnH+Sdgt5jLc4ahtRp+efN8c5+Y8xtTZ5xFQVD0g8eSQvE8FKpZZXfNWfCP5IUcage83mFy678/7piyXCKWIEZ5Ha+z7PPFORsNcx4Zo1QXebfXnFW5YX6XD+wAOl91FDR0WC2JtVgUTtYt3OjDf2mtNqzwCe4mwXjWb9QnuvUXfckRuPZHFpvNiTMIZGgczVPZjfvWvXs0ssvOnBRM4mFlzMxkaiRPmIV+ouv99tTT78BI/9EnvaZq385fSUF/Cd8i7v1Gr2kPqhNKpHF2p0tK1pJn6z1riJlWFOz1Op6CEfMhmPYMkuXfwfl4+vtE4LlKUryMguKecdyjN5SCaNXbuwegw2kI+oWz7wYV0u8duH5amA4c73VW8fhLzcoYwLRkeC5zR3QqBE87iCxsWs3ZzoHO/+/2i2JjDsIIyESYNj0p4rGxQgHgwQenJtzaQ0abYGHqOcI21iLjIk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DbKTwW1xhvfAt2zgzyJaoiCAFApp7StmdDNL/NREZzYVR2J0NJDZ72X68o6R2eTLSRZJYVDN8FmuS3uyG6BBguO554DvqfPgGJ4dCthQXepvkDEZJVxMmzGuUfd9YgI/z0dJ1HQ+Xj8EAbxIrOx5vrZW8t9uG7RHLlMTt9u1Iwfa0YKhILtwFA8QhmILa/2MPZate2fhMHvFiboMlJI6gK5pLS+aoFD512kIjfNLPM34GpkpeTPxejs4CnGAentrmCXk9wEcXrQWzyl1sQ3uvU/rXeoI+QpPS9b/HbJM1FlA3DFGLENxganzdlEJdEe8t+bO3utVXw5Ax1UO1kLug7kcFQomqCnaEeH32/YVMI5BhY/iF/zDbVDjpf2HFpRN/8Xb3AJ76BA817GPwjnOXorKJ8r2fASnTXVNG8gf5X+d4f8l1S+QZnEQ4bHnNG2aMw/0p0EQgC8sdNz9eZbIYXI8vdNomZNoZtpT+WRWHnPgjlPLBMbsKZIcaaKQ44LzAKooC45bpPENx2Tdh+hLTZ1jhfRyq4SGC39tA3HWpeEpqny2y4mnvIbLS3KF/GTOJx16Cvj+mDVEvHjwOAK2LNv5hlCAzo7xTAeEustfn4jIMoncZdK2gv+K6HBqbg8fQzEnhY1Qvw/cbx2/G0T6LE7FzF5z2OogsbzC223xO6LXRSUJXKX0My0RT30uoXB0cYImw1rw4tfl4PKt4nxkm2HTq/3D1KcYWpHm9RE3gPiA+ge7Ace7zdY8AZXzKPuNZpmwdcyeputyVoAaqgmOsJ17BJcGlN2sJRS5t8DJ/Enln1QbC9f3OjQcd3KPEGrdvUUMKyWhNviimhafha4lTFIbvbH7nmxHB3EzN5+kCfBBTzHhf5XNboq3UEzJAxLYBbbv8mpNNQgg X-OriginatorOrg: oracle.com X-MS-Exchange-CrossTenant-Network-Message-Id: f08e84df-54bd-480b-259c-08dbb63959dd X-MS-Exchange-CrossTenant-AuthSource: BY5PR10MB4196.namprd10.prod.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Internal X-MS-Exchange-CrossTenant-OriginalArrivalTime: 15 Sep 2023 22:16:04.1538 (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: g5wgSyNR6G09XhUHTGGdZ4lUBaziCOffsQYidofdwKijflM0C1DaxD0RpQMvLxTsgv3kNQMrps4R6wql6zIawg== X-MS-Exchange-Transport-CrossTenantHeadersStamped: MW4PR10MB5861 X-Proofpoint-Virus-Version: vendor=baseguard engine=ICAP:2.0.267,Aquarius:18.0.980,Hydra:6.0.601,FMLib:17.11.176.26 definitions=2023-09-15_19,2023-09-15_01,2023-05-22_02 X-Proofpoint-Spam-Details: rule=notspam policy=default score=0 malwarescore=0 mlxscore=0 bulkscore=0 adultscore=0 phishscore=0 spamscore=0 mlxlogscore=999 suspectscore=0 classifier=spam adjust=0 reason=mlx scancount=1 engine=8.12.0-2308100000 definitions=main-2309150200 X-Proofpoint-ORIG-GUID: PipOTme2fxSCDHfAyj52zXp3pQW0KwHa X-Proofpoint-GUID: PipOTme2fxSCDHfAyj52zXp3pQW0KwHa X-Stat-Signature: 7cdnjghhhwrywj3e9co96m59cyhhyo4i X-Rspamd-Server: rspam10 X-Rspamd-Queue-Id: A138318001B X-Rspam-User: X-HE-Tag: 1694816192-641168 X-HE-Meta: U2FsdGVkX1+U2+rHCoEbAlIWXyjX9OJT/GmbnBE208A0AXce/20onrF9InkCd/OqdqyZSzxOpQcO9s9w21ZgkL483OjVF15O2vgMdHz49yjjxQhvgo10q3dTCW5pvrjRphK8sa7nSKFzXG9oduOqO7xMOH9R/ioBR+l+y483g6jpRdr3qFMWor6iLywbyr5owIlnI2VsjR7aoa8Ps6BfpgWGLMrbRc19WscSmvoqN27+YhOXBjdPCZb8eNGEllRWJPI6aD4QcY3oHw9sDzpbPF8xlvcS5ugFR+9vnbyXE6fcrv5tJdlnbhmPlG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hDDAUNMIl2j+Z3sqHfTdo85ZoZpW844dZnPc6gRqiFAt7E9HuEjJAvJ2ncxslgP+20NmO/aSynNe3BPHYZq3M6t1NHS39oPJ+qoKtvuiAbueNyMvxEB60LkP6dtFjqVyu0RofD/n2wOJhxzhOHuUfkdvCpt3Gzxi66YzM1mpGD3f0DaN9WJ1Ubj8TovIcBGoGsswghMh8f+mJSXMR7DH3TB+5YF5vUMMV4yOeRJDj3wCU4= X-Bogosity: Ham, tests=bogofilter, spamicity=0.000000, version=1.2.4 Sender: owner-linux-mm@kvack.org Precedence: bulk X-Loop: owner-majordomo@kvack.org List-ID: From: "Matthew Wilcox (Oracle)" Convert the callers to expect a folio and remove the unnecesary conversion back to a struct page. Signed-off-by: Matthew Wilcox (Oracle) Reviewed-by: Mike Kravetz Cc: Sidhartha Kumar --- mm/hugetlb.c | 29 +++++++++++++++-------------- 1 file changed, 15 insertions(+), 14 deletions(-) diff --git a/mm/hugetlb.c b/mm/hugetlb.c index 7bbdc71fb34d..744e214c7d9b 100644 --- a/mm/hugetlb.c +++ b/mm/hugetlb.c @@ -1439,7 +1439,7 @@ static int hstate_next_node_to_alloc(struct hstate *h, } /* - * helper for remove_pool_huge_page() - return the previously saved + * helper for remove_pool_hugetlb_folio() - return the previously saved * node ["this node"] from which to free a huge page. Advance the * next node id whether or not we find a free huge page to free so * that the next attempt to free addresses the next node. @@ -2201,9 +2201,8 @@ static int alloc_pool_huge_page(struct hstate *h, nodemask_t *nodes_allowed, * an additional call to free the page to low level allocators. * Called with hugetlb_lock locked. */ -static struct page *remove_pool_huge_page(struct hstate *h, - nodemask_t *nodes_allowed, - bool acct_surplus) +static struct folio *remove_pool_hugetlb_folio(struct hstate *h, + nodemask_t *nodes_allowed, bool acct_surplus) { int nr_nodes, node; struct folio *folio = NULL; @@ -2223,7 +2222,7 @@ static struct page *remove_pool_huge_page(struct hstate *h, } } - return &folio->page; + return folio; } /* @@ -2577,7 +2576,6 @@ static void return_unused_surplus_pages(struct hstate *h, unsigned long unused_resv_pages) { unsigned long nr_pages; - struct page *page; LIST_HEAD(page_list); lockdep_assert_held(&hugetlb_lock); @@ -2598,15 +2596,17 @@ static void return_unused_surplus_pages(struct hstate *h, * evenly across all nodes with memory. Iterate across these nodes * until we can no longer free unreserved surplus pages. This occurs * when the nodes with surplus pages have no free pages. - * remove_pool_huge_page() will balance the freed pages across the + * remove_pool_hugetlb_folio() will balance the freed pages across the * on-line nodes with memory and will handle the hstate accounting. */ while (nr_pages--) { - page = remove_pool_huge_page(h, &node_states[N_MEMORY], 1); - if (!page) + struct folio *folio; + + folio = remove_pool_hugetlb_folio(h, &node_states[N_MEMORY], 1); + if (!folio) goto out; - list_add(&page->lru, &page_list); + list_add(&folio->lru, &page_list); } out: @@ -3401,7 +3401,6 @@ static int set_max_huge_pages(struct hstate *h, unsigned long count, int nid, nodemask_t *nodes_allowed) { unsigned long min_count, ret; - struct page *page; LIST_HEAD(page_list); NODEMASK_ALLOC(nodemask_t, node_alloc_noretry, GFP_KERNEL); @@ -3523,11 +3522,13 @@ static int set_max_huge_pages(struct hstate *h, unsigned long count, int nid, * Collect pages to be removed on list without dropping lock */ while (min_count < persistent_huge_pages(h)) { - page = remove_pool_huge_page(h, nodes_allowed, 0); - if (!page) + struct folio *folio; + + folio = remove_pool_hugetlb_folio(h, nodes_allowed, 0); + if (!folio) break; - list_add(&page->lru, &page_list); + list_add(&folio->lru, &page_list); } /* free the pages after dropping lock */ spin_unlock_irq(&hugetlb_lock);