From patchwork Fri Aug 25 19:04:24 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Mike Kravetz X-Patchwork-Id: 13366223 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 6C557C3DA66 for ; Fri, 25 Aug 2023 19:06:02 +0000 (UTC) Received: by kanga.kvack.org (Postfix) id 79A9A68000B; Fri, 25 Aug 2023 15:05:54 -0400 (EDT) Received: by kanga.kvack.org (Postfix, from userid 40) id 7270468000F; Fri, 25 Aug 2023 15:05:54 -0400 (EDT) X-Delivered-To: int-list-linux-mm@kvack.org Received: by kanga.kvack.org (Postfix, from userid 63042) id 3A26568000B; Fri, 25 Aug 2023 15:05:54 -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 17DC768000B for ; Fri, 25 Aug 2023 15:05:54 -0400 (EDT) Received: from smtpin18.hostedemail.com (a10.router.float.18 [10.200.18.1]) by unirelay03.hostedemail.com (Postfix) with ESMTP id EE908A078E for ; Fri, 25 Aug 2023 19:05:53 +0000 (UTC) X-FDA: 81163556586.18.5D1B617 Received: from mx0a-00069f02.pphosted.com (mx0a-00069f02.pphosted.com [205.220.165.32]) by imf03.hostedemail.com (Postfix) with ESMTP id 5C4CA20030 for ; Fri, 25 Aug 2023 19:05:50 +0000 (UTC) Authentication-Results: imf03.hostedemail.com; dkim=pass header.d=oracle.com header.s=corp-2023-03-30 header.b=pACqANPj; dkim=pass header.d=oracle.onmicrosoft.com header.s=selector2-oracle-onmicrosoft-com header.b=gTWTMZna; spf=pass (imf03.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=pass ("microsoft.com:s=arcselector9901:i=1") ARC-Message-Signature: i=2; a=rsa-sha256; c=relaxed/relaxed; d=hostedemail.com; s=arc-20220608; t=1692990350; 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=9P3Cyny+mcYwz1jwFSE8K4E3sWShTXUh71C/hj9IWl4=; b=TKaPvI9dnpvYLZ4Bkb0Wo7L3YoDTDKHhVldJpcykMluuaOKG7eZSd/HSuhWhUMnJvCCtNn c9te5kXevOWvHZGAVusdttJdSFZ0N1l4gtTjPp8ao1TGe8NBe0aMtggIlQs9xhobn5a725 QiMfUxd4IKQfUonMwdhA5S+zpONkRz4= ARC-Seal: i=2; s=arc-20220608; d=hostedemail.com; t=1692990350; a=rsa-sha256; cv=pass; b=d9q3dMDK6JbeY/zL7DFg2h7T4OxpVF37P7VOPG722oMlksoDU/IpweLA13dW33JtGUzepV UGeIrB17NdJvVtaTEXo7yStV9BX7NYf1TYBEPz+hWvNVm2a1uV/s6tSwqFPqvQ/ROSpJCc Rd3bve/FjTw/R2dppsYbyeE+j41DaLM= ARC-Authentication-Results: i=2; imf03.hostedemail.com; dkim=pass header.d=oracle.com header.s=corp-2023-03-30 header.b=pACqANPj; dkim=pass header.d=oracle.onmicrosoft.com header.s=selector2-oracle-onmicrosoft-com header.b=gTWTMZna; spf=pass (imf03.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=pass ("microsoft.com:s=arcselector9901:i=1") Received: from pps.filterd (m0246627.ppops.net [127.0.0.1]) by mx0b-00069f02.pphosted.com (8.17.1.19/8.17.1.19) with ESMTP id 37PIEepJ000972; Fri, 25 Aug 2023 19:05:06 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=9P3Cyny+mcYwz1jwFSE8K4E3sWShTXUh71C/hj9IWl4=; b=pACqANPjZGRlFsTq2VJ0FL80q/JHBrsJ+jUVMbK0ACpMXN/uDgnZeJhiGSHYWxUrJkDR ECeRIS9hkXx0lKBsRfSV5/JyzOYP1A8qeJoGwukYEewrnhQXpY81WLvebFEXjHmYjFp8 0plKVPUcYg9AWD07S+KRtz5AiKG5QBZ8iH2/esS36kT5bwkpLs4+t7pFk1I1dKViWSW1 G4ZIaE9f0LchEs7ztK5ZDEVsWutGn8/4y+o8yyjVMq97sbvjvLihwAsKH5PFM69551uL OHRYZXcD1YR8skBEqIk7SKOyjkr+QoUqPWNg5Olt1FOVYCRJdacxYMCuw0EjgapHEMTU xg== Received: from phxpaimrmta01.imrmtpd1.prodappphxaev1.oraclevcn.com (phxpaimrmta01.appoci.oracle.com [138.1.114.2]) by mx0b-00069f02.pphosted.com (PPS) with ESMTPS id 3sn1yxq01b-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=OK); Fri, 25 Aug 2023 19:05:05 +0000 Received: from pps.filterd (phxpaimrmta01.imrmtpd1.prodappphxaev1.oraclevcn.com [127.0.0.1]) by phxpaimrmta01.imrmtpd1.prodappphxaev1.oraclevcn.com (8.17.1.19/8.17.1.19) with ESMTP id 37PI417C005759; Fri, 25 Aug 2023 19:05:00 GMT Received: from nam12-mw2-obe.outbound.protection.outlook.com (mail-mw2nam12lp2043.outbound.protection.outlook.com [104.47.66.43]) by phxpaimrmta01.imrmtpd1.prodappphxaev1.oraclevcn.com (PPS) with ESMTPS id 3sn1yuya0v-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=OK); Fri, 25 Aug 2023 19:05:00 +0000 ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=OVcPmGBj19r133Gy/VFs+hUe4ko9UR1s4FN2yjogf0RiIx8OMZDaSqBSvRrJ7ryKM5EbuLP7arZMMd7JC5RuRMkIjH0Pt44DiK4Y93qC3PA661SykBQ9yAHUyfD7iKAZ+jYvooN51mocNjeY29WPfqTYyBVLmSxWzDmQDc6hGgMpIFUnE2AugTxqwfXU03O+HCap/GXEjOsn0uxn97okBjynsqDNEzotA6VFJKVmFOA6IKNWDHRFyuc3ZpaMRbqnyMdEMFQoGLvxls6iBmDn5w1SDzCaco9V+yha3YyW413tScnN3tb9MhNILrQeIlJcgvFqDEtvcPwb8wDkpxBjxQ== 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=9P3Cyny+mcYwz1jwFSE8K4E3sWShTXUh71C/hj9IWl4=; b=LVZZxllwW5bofTD1Zoh4lB9vxurlz+v0CVMuO6vlI4DP/lcWcgP01NDSdzBqwUIBLIKDJpYn6DdgAUSyU/T59xybNDwd+DPFJ36piPTdL7nL63kjv6fOUdB4D04eM2VtP+5TIYOcxGtwNcgD81Ua2eDzEVuHWbV0vG2msUnsU3c249wHKwELCt++6ToiMMm0Joh5zU56/Fh8xZa88XA/BR0qCrb31c8LhLosvi3SwMpAD2QkNifeuPq0a4mfV5kNaB8s+7zyQn45F1KMMNgt9mA843C7GtVOmnq6mlgxFJ2tQZ7HutdPv66NEF4RjuPu9ed5waT2HCS6KSdSGfBB2A== 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=9P3Cyny+mcYwz1jwFSE8K4E3sWShTXUh71C/hj9IWl4=; b=gTWTMZna3DkMP2t2BbLfW+hTipfF0H8hIZuwzCpSEIMB4JGQxdGK+fZ9cVGrrbnbP0qFfzoWFCU90ONN/7BiMzuPCmtFYjsC/NgDVtARMq2zwH1HHJCHvxrayCCoQ9hYZpuNYch5Y0aqUi0sJPgKn9W5xg2vGOUgpVDFYL4/djU= Received: from DM6PR10MB4201.namprd10.prod.outlook.com (2603:10b6:5:216::10) by DS0PR10MB6895.namprd10.prod.outlook.com (2603:10b6:8:131::20) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.6699.27; Fri, 25 Aug 2023 19:04:58 +0000 Received: from DM6PR10MB4201.namprd10.prod.outlook.com ([fe80::8057:a3e9:cbd1:252a]) by DM6PR10MB4201.namprd10.prod.outlook.com ([fe80::8057:a3e9:cbd1:252a%4]) with mapi id 15.20.6699.022; Fri, 25 Aug 2023 19:04:58 +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 04/12] hugetlb: Convert remove_pool_huge_page() to remove_pool_hugetlb_folio() Date: Fri, 25 Aug 2023 12:04:24 -0700 Message-ID: <20230825190436.55045-5-mike.kravetz@oracle.com> X-Mailer: git-send-email 2.41.0 In-Reply-To: <20230825190436.55045-1-mike.kravetz@oracle.com> References: <20230825190436.55045-1-mike.kravetz@oracle.com> X-ClientProxiedBy: MW4P223CA0006.NAMP223.PROD.OUTLOOK.COM (2603:10b6:303:80::11) To DM6PR10MB4201.namprd10.prod.outlook.com (2603:10b6:5:216::10) MIME-Version: 1.0 X-MS-PublicTrafficType: Email X-MS-TrafficTypeDiagnostic: DM6PR10MB4201:EE_|DS0PR10MB6895:EE_ X-MS-Office365-Filtering-Correlation-Id: 0b3179b0-4cfb-44ea-5855-08dba59e2d10 X-MS-Exchange-SenderADCheck: 1 X-MS-Exchange-AntiSpam-Relay: 0 X-Microsoft-Antispam: BCL:0; X-Microsoft-Antispam-Message-Info: arA0fqYiuagTDTT5usXxz3l50Irt/cQTgoVY4737hdO3oI7Txl5cHL1H2J8PEPse8WtibGhylArf+DwIibQnVqPVbXra5zFm1mCdIQ+KH/u/ZMB55XE+VH5xA9xUj/G5BLU0xx4yrMwn1tsQ5sfL3YaaRcwZPO4Giwy5H2waqlwWT5jAK1Asm6NRIE76VBSmo+j9YKR3RsSvmPNc3dbyb6Aq4w01U1uyIPs9ZtC/WJacn0wpQ1tgrbTFsZoTtIQnT8H5WobGoothiN2yWGZEEsDh0gCuL0bcpgJQEZyF8ysWZMRm+8elP1BXH4sm1Wcgx6oCqkiEtCPj3sTqPQb+tam7eQLGZxa8/yku+A8QHi/dZr1Wbafu1rBvCG54lzBoIJJ/HHKMoUQ6PcTCQzwdN4MYLJw9k/e4z71stvZ8RXXbubMl9StFt/I9TB379iwl8JzuWWJfVsRGD317IYCMmkk5+JWvXZwz/6mlw12+bNHz1UL0MIOnaQ3xndfY+88DlsGdjTlp9oQuIPAAlLZQ6pyHJlzbsONjoo5ca3I4ze2Aua20CJpQXyujSf0fXVGYgo9tylck631RNkbMQz2swK+gXY7gU82S0BUjHXxTK+k= X-Forefront-Antispam-Report: CIP:255.255.255.255;CTRY:;LANG:en;SCL:1;SRV:;IPV:NLI;SFV:NSPM;H:DM6PR10MB4201.namprd10.prod.outlook.com;PTR:;CAT:NONE;SFS:(13230031)(39860400002)(366004)(136003)(346002)(376002)(396003)(186009)(451199024)(1800799009)(54906003)(66476007)(66556008)(66946007)(316002)(478600001)(26005)(38100700002)(6666004)(41300700001)(6486002)(6506007)(86362001)(6512007)(2906002)(83380400001)(8676002)(8936002)(2616005)(4326008)(107886003)(5660300002)(7416002)(44832011)(1076003)(36756003)(14583001);DIR:OUT;SFP:1101; X-MS-Exchange-AntiSpam-MessageData-ChunkCount: 1 X-MS-Exchange-AntiSpam-MessageData-0: sDyjABoO2OnZ1+8Bc1YJhA4ZcA6z6Vq4x9xG00tC+QGE3DtXcS6VJgStCzzBE+2mvU8cNggcivRi00WDaQniUtM9njpPIi9LamKsoMHxZZhB1I1AntTDlHI5T0idpdXrhicXJZTNT3GIgHHRfTlxuCy9zbYEn15UnQ0WGp8HXgKL7cuotHJcD/QF6lIeyGAo/KE+33zLOJgV42rAgLr7XWZQDHLrhuBDyzMwF3YBUGP8G7BSJJ6rtFT+FkPKhKGsDLfhxAlbsyxsBkuIWvC2JiYZKZQLhGjJ5c7Wgpz9/OXw7c7MzeTpo1F5/lXbSalnrF98B1SW/+J8uVm0sklaJib37P1NJaAM4D/zaOEhr4dt/M7B/SQ9DqUHA+HYyLf1B9QwM1rEMJImy5nEmkWJZIpZrekX4KbyNRZ6n00hnEh+23l3KyWiWidlZx+Xr/P5zlIB007CSTpgfSlW+rHQMESlBdnEvEAAtxo3SDwqojCYHYac1pN28uVivurlp4aZRgkZgNPRkw/+/nTJswNQIsymqyqQFDlZsNmSiA3AqvPiGHMRUGbPAnDFORXvRSGMdmFKmQsUw06w77CM6cj3pD1U5hRhQpDYAfwkbUBzCR9qVe/xbfJigN+10pPmK3LzxgwqjVsBdnb698tlOvxslm9boiiwejxfjR0aXdgJyPmnvvDswvcIzqstFlGKBDnFH612EARUnfbKM1YmblRGPYzr6vKIl1f3b/BsotP4QNJaOfaQPjWaLa7zBq2Tr4QA3sEdgHlA7aLPLQZds4lm5+cjQR/joNvKgfMPL8nfVlTBkwORL4MbWzSmu+xPm6onO/YRDooSvO2PDDAs3E8h1WfUFsnzehQ3jg33Yzm24xgvdI3u+pO9asvcZ0vIDmOvPaLnyPDroe+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ScsNi9CHWmZURoydrd8WKBU39HhJ1an9S/efMsZ/I5qVMdzz/BOJNePUEwA7wXxjk5YFDBaKQwrgt7IBE7pWicuz3ETJVg4v5ZQGVavkA4wYKPNnuwPw0q/bTlJtoG9RYiadpFjjcwwWHQGNOO5YnJ2EVXM9stouhDQayiIs6DbTXmCDxrva15cNWuR7cpiyrirD4mWhyyCO3b+v8SOsHZdeL6RlJPVtogT4hVOe6+eWIKlWe8greUhFIzJulmpazst+tm3oH63JR0igQb6z/AvhDm85bj27vfJHtPTosZ0B9gTvzWSoh4GGeJa8XZlf1KPp7cVtz3IEtZEttL+RJMULp2lKp+/3SimetFcqtmg+58e5pktNygvG0mYBcBvO/mxjIlkEO/IE//dVc9HaxTHG+TeobGpUtVMjvMUrhKgh9iTsXnz+GSTmpZTRjCj9xL4qNUe+gOHs1sX+21mpNaH7aBwBsQ+0oeMoCGfR0V0OeK+Ko2qa7w94D09cm0PMV7tB1VFnfwCpyYfTUJD6Mfa7g3K7w7eKtXDFm/UgWCcR/W3c9s/G8TlctnY4SiIye9z1KY7gtde0ALU0Zi2H4paRK5quFl9nON7PcO/xCnQVNfRoU/QhixG1HpNYXV5SSaQ8J1416WgY3vRblVMGQTK7gTidcrtr2NMlmG0EkgB/4wXTYq9hEprojpE22BJ08zEMotSaaqlHgn+FHyjmp2KfTJdfUzvxM1gvJxVkQjIp4sOfraNBnEAXBtkra9lwsDOx8Vw296wK3Mo8Oc5QaKROfuLI1OqDWySmL629VUQk+bHuKIHMTHdHrGIQyYgnj0gHMwLnCz8a9r+FKJBCIvKyIYl7vVIFx X-OriginatorOrg: oracle.com X-MS-Exchange-CrossTenant-Network-Message-Id: 0b3179b0-4cfb-44ea-5855-08dba59e2d10 X-MS-Exchange-CrossTenant-AuthSource: DM6PR10MB4201.namprd10.prod.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Internal X-MS-Exchange-CrossTenant-OriginalArrivalTime: 25 Aug 2023 19:04:58.4911 (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: eWYBOH6ca0+EYdEoSF9dsZIJjYIR1CZqRiUJepR7Tb6DK8aaYFM/c5XwO4XAZPvTIUZ3vz9tEMi0We2WGhUXbA== X-MS-Exchange-Transport-CrossTenantHeadersStamped: DS0PR10MB6895 X-Proofpoint-Virus-Version: vendor=baseguard engine=ICAP:2.0.267,Aquarius:18.0.957,Hydra:6.0.601,FMLib:17.11.176.26 definitions=2023-08-25_17,2023-08-25_01,2023-05-22_02 X-Proofpoint-Spam-Details: rule=notspam policy=default score=0 spamscore=0 bulkscore=0 mlxscore=0 adultscore=0 phishscore=0 mlxlogscore=999 malwarescore=0 suspectscore=0 classifier=spam adjust=0 reason=mlx scancount=1 engine=8.12.0-2308100000 definitions=main-2308250171 X-Proofpoint-GUID: b0m3FrRmbHGtG0JsJ0bwj8eE5EcS9YFF X-Proofpoint-ORIG-GUID: b0m3FrRmbHGtG0JsJ0bwj8eE5EcS9YFF X-Rspamd-Queue-Id: 5C4CA20030 X-Rspam-User: X-Stat-Signature: gfp6bnnuxd4pajx4nbx1qp3dxp6fbhba X-Rspamd-Server: rspam03 X-HE-Tag: 1692990350-174461 X-HE-Meta: U2FsdGVkX1/XPrEZdXLi/CEP15sFKXL1VUFfM2+yJOH/8Q3VfO/U5oQ/IrFRqDpAZPObeNgRCl1J0TSibrBI2rIdo19BU1OKJyEGOYz6fr7V5uCssg3WaFjtOWsOVDDfcPFkqo1cIrFPIMFPZ4mGtwVF7A7L2n7ifNH1YFC1n1oya+2KMBncGWd1gZ00aM06czrqag15QDlNCPO9pHx0394VeAlkUYRTtpeB3zBe47OReKoc+YMtRi6knUYHd4MlcQSKiuWe4Pg+WUtGIdbHTB78SLEgNtXYgJLzCAz4DcGs6T/s3Rz0h1pJncQ7o6+7oS0yqZCdn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Io194G+h1pFPyS/hXhcoKnGnv7TBwk7anUzAfawoU21YnTFBpcOoVNlRa3oA3jLawsIWTnNQWyUksTIBT+2HxLURwVKfBhgTyKj3tLynj1xezaa7/N93t+fB/zu19rK99d+wkljF/+S/axhLHNGIgfe2d536IbydnyvJYxv1fkJgtbtXu77A6A5N/tu0pZbZh9xiGIPPxkv1/42GX6UdEsWmYuSlk= 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 a5348dfada89..ec10e3804060 100644 --- a/mm/hugetlb.c +++ b/mm/hugetlb.c @@ -1446,7 +1446,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. @@ -2217,9 +2217,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; @@ -2239,7 +2238,7 @@ static struct page *remove_pool_huge_page(struct hstate *h, } } - return &folio->page; + return folio; } /* @@ -2593,7 +2592,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); @@ -2614,15 +2612,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: @@ -3417,7 +3417,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); @@ -3537,11 +3536,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);