From patchwork Tue May 28 22:03:21 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Sidhartha Kumar X-Patchwork-Id: 13677495 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 D0774C25B78 for ; Tue, 28 May 2024 22:03:44 +0000 (UTC) Received: by kanga.kvack.org (Postfix) id 500616B00A2; Tue, 28 May 2024 18:03:44 -0400 (EDT) Received: by kanga.kvack.org (Postfix, from userid 40) id 4B0316B00A3; Tue, 28 May 2024 18:03:44 -0400 (EDT) X-Delivered-To: int-list-linux-mm@kvack.org Received: by kanga.kvack.org (Postfix, from userid 63042) id 3296C6B00A6; Tue, 28 May 2024 18:03:44 -0400 (EDT) X-Delivered-To: linux-mm@kvack.org Received: from relay.hostedemail.com (smtprelay0010.hostedemail.com [216.40.44.10]) by kanga.kvack.org (Postfix) with ESMTP id 1599A6B00A2 for ; Tue, 28 May 2024 18:03:44 -0400 (EDT) Received: from smtpin11.hostedemail.com (a10.router.float.18 [10.200.18.1]) by unirelay10.hostedemail.com (Postfix) with ESMTP id 883FEC0466 for ; Tue, 28 May 2024 22:03:43 +0000 (UTC) X-FDA: 82169182326.11.B0569E6 Received: from mx0b-00069f02.pphosted.com (mx0b-00069f02.pphosted.com [205.220.177.32]) by imf11.hostedemail.com (Postfix) with ESMTP id 5C2AF40012 for ; Tue, 28 May 2024 22:03:40 +0000 (UTC) Authentication-Results: imf11.hostedemail.com; dkim=pass header.d=oracle.com header.s=corp-2023-11-20 header.b=RpKVB79G; dkim=pass header.d=oracle.onmicrosoft.com header.s=selector2-oracle-onmicrosoft-com header.b=zg6VnJc5; arc=pass ("microsoft.com:s=arcselector9901:i=1"); spf=pass (imf11.hostedemail.com: domain of sidhartha.kumar@oracle.com designates 205.220.177.32 as permitted sender) smtp.mailfrom=sidhartha.kumar@oracle.com; dmarc=pass (policy=quarantine) header.from=oracle.com ARC-Message-Signature: i=2; a=rsa-sha256; c=relaxed/relaxed; d=hostedemail.com; s=arc-20220608; t=1716933820; 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: references:dkim-signature; bh=vat+AQg2o2wqvOzioontAUo0eKsRhYMxy2ROS9yKV4M=; b=S9IT3wZuHt7xJpvKoiuMa8phRxwiQeqKaMvAxLenfkX4xYYEPcoMuqN/HCnzKUp9ZJgSIt Ig0AjyDnF0EwaOZx3utEC3pxTTUJblq2jJT77cRh7rq0MCcvmXOeoBvDlck9J5PjJMDijY zDg0kU0CWM9RP4Nv6qbCkkSrXdgc9zc= ARC-Authentication-Results: i=2; imf11.hostedemail.com; dkim=pass header.d=oracle.com header.s=corp-2023-11-20 header.b=RpKVB79G; dkim=pass header.d=oracle.onmicrosoft.com header.s=selector2-oracle-onmicrosoft-com header.b=zg6VnJc5; arc=pass ("microsoft.com:s=arcselector9901:i=1"); spf=pass (imf11.hostedemail.com: domain of sidhartha.kumar@oracle.com designates 205.220.177.32 as permitted sender) smtp.mailfrom=sidhartha.kumar@oracle.com; dmarc=pass (policy=quarantine) header.from=oracle.com ARC-Seal: i=2; s=arc-20220608; d=hostedemail.com; t=1716933820; a=rsa-sha256; cv=pass; b=nEKEOgExChYjdV9BnXHUfoNtcveRai+vz5Xsds5dAQzNA3k+emYEqCCYKBHdtruIn6s4h3 46jZ7gc0Z2rw8Vs5T72idEefd26L7/QAqrV9dI4voooFoBjqD80GkugmaR4ozWGBhVe20h q3lil9PiGfT3XGbRBY1G2IsFpKqP8x0= Received: from pps.filterd (m0333520.ppops.net [127.0.0.1]) by mx0b-00069f02.pphosted.com (8.17.1.19/8.17.1.19) with ESMTP id 44SI64ts031973; Tue, 28 May 2024 22:03:32 GMT DKIM-Signature: =?utf-8?q?v=3D1=3B_a=3Drsa-sha256=3B_c=3Drelaxed/relaxed=3B_?= =?utf-8?q?d=3Doracle=2Ecom=3B_h=3Dcc=3Acontent-transfer-encoding=3Acontent-?= =?utf-8?q?type=3Adate=3Afrom=3Amessage-id=3Amime-version=3Asubject=3Ato=3B_?= =?utf-8?q?s=3Dcorp-2023-11-20=3B_bh=3Dvat+AQg2o2wqvOzioontAUo0eKsRhYMxy2ROS?= =?utf-8?q?9yKV4M=3D=3B_b=3DRpKVB79Gtl8hMvY/zmkqNtrW4FhX4zq4aQnn7pMiHdCe6FAc?= =?utf-8?q?zASzOeQybD6OZ7A2Md7B_gwdPChYlnBItyYClC0h7zoDAzbzvNynvnTk+1k+xQ7bU?= =?utf-8?q?XsyWxhq8prlovoHOxqIfTW7H_8uOoiNATuh+O81a6I8FWLj1kUqAwtX8UARnyo9If?= =?utf-8?q?NImHn1YWQ3qO5q9vzrQJ34anIrn2_kWW66xGmDaBtdpU0C2Rhia5AIesNdDd8y14N?= =?utf-8?q?K8Vhl5zufhIAWZhq4qouzlLfrZla8nVQ_IBWjb9z5gLpnLMctYl/5WcL81J3NWeFL?= =?utf-8?q?K5P3yhC8RWowsU2fP/wSAUrAp64Sxp8jERum_3w=3D=3D_?= Received: from iadpaimrmta01.imrmtpd1.prodappiadaev1.oraclevcn.com (iadpaimrmta01.appoci.oracle.com [130.35.100.223]) by mx0b-00069f02.pphosted.com (PPS) with ESMTPS id 3yb8g9nhj8-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=OK); Tue, 28 May 2024 22:03:32 +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 44SKIi5U024001; Tue, 28 May 2024 22:03:31 GMT Received: from nam10-mw2-obe.outbound.protection.outlook.com (mail-mw2nam10lp2101.outbound.protection.outlook.com [104.47.55.101]) by iadpaimrmta01.imrmtpd1.prodappiadaev1.oraclevcn.com (PPS) with ESMTPS id 3yc52br2r7-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=OK); Tue, 28 May 2024 22:03:31 +0000 ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=iOSiTibU/LGHCna6q9HitcjA2la6sCTFhCv+7TW231oZqMwudN8vMsb634nLnv67aVq0hRSeew1ZQf2vi9yaTvCixw+fTRmARP1W6p1yJzYZXFOBkLMhT5PRYZkvxBjnpXvVhrHt/i774iRvICNu7bavOwwtlw3oKUfmr3H3+x0gLg5LGkaFVG1jUBwzsTetmyqr1nVW/BDb2cip+9m4UbgHEk5keaP1sZXWt7XZVLZ2WJnkukt68+fa3SN0xzUMvVBGy8BrnaBZS30A1uOW7frPNd6vCx15ONHmh+kUyQS6OitoYqfFKn57cE98gq/M+VSe1KPYyBleHm9d1iVRJQ== 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=vat+AQg2o2wqvOzioontAUo0eKsRhYMxy2ROS9yKV4M=; b=cu6Hq89vu/0Mc7xo8n0JtRD2/wPH67sY+OdwXogrfp11PRGJdAkgWgHp83PK2I8sz9VIFq6OeGe6R8nXUCjuHDKgkDZVwy+5yEV7ZCDZG7GWkPlBrRfEOjGA9J3/JXkJotDLrr79SrN4EfIkyXo1d8MLqcYQ2R13VgddO6Bu1z48DxFry2LjF8A7sAr2468K/MsJqjWaQ0+ZG/tKgluTPLgRbwNcKeY29t0sdH7Yslt0LvuZxc0iUIwCbdulaAHfboIfTMuU7tVjuvAJihlo8T8eHXq/NY/6H9v1wKMrfCN+DrJq6mEopevspLtOXSCXzlPWm5aWbFnDitbwvS6FsQ== 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=vat+AQg2o2wqvOzioontAUo0eKsRhYMxy2ROS9yKV4M=; b=zg6VnJc5BN6JxBOYB5hyZVsSBSG12tW8tOJbS/Su2OtWWPFZKd0j47Z6FCvD+hgN2eOHPyxFCZ7+4ImWuVB7aOETGFBgkfBPOTtYTaY/yi3mPBObmXXUsEfEy7JC4Ax+P/z6uDVa1DUaSAdlvQ+hSspULHCp25wOzej1a+hd6+M= Received: from CH0PR10MB5113.namprd10.prod.outlook.com (2603:10b6:610:c9::8) by PH7PR10MB6508.namprd10.prod.outlook.com (2603:10b6:510:203::18) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.7611.30; Tue, 28 May 2024 22:03:29 +0000 Received: from CH0PR10MB5113.namprd10.prod.outlook.com ([fe80::eab6:6dcc:f05f:5cb2]) by CH0PR10MB5113.namprd10.prod.outlook.com ([fe80::eab6:6dcc:f05f:5cb2%6]) with mapi id 15.20.7611.030; Tue, 28 May 2024 22:03:28 +0000 From: Sidhartha Kumar To: linux-kernel@vger.kernel.org, linux-mm@kvack.org Cc: akpm@linux-foundation.org, vishal.moola@oracle.com, muchun.song@linux.dev, david@redhat.com, osalvador@suse.de, willy@infradead.org, Sidhartha Kumar Subject: [PATCH] mm/hugetlb: mm/memory_hotplug: use a folio in scan_movable_pages() Date: Tue, 28 May 2024 15:03:21 -0700 Message-ID: <20240528220321.144535-1-sidhartha.kumar@oracle.com> X-Mailer: git-send-email 2.45.1 X-ClientProxiedBy: MN2PR05CA0049.namprd05.prod.outlook.com (2603:10b6:208:236::18) To CH0PR10MB5113.namprd10.prod.outlook.com (2603:10b6:610:c9::8) MIME-Version: 1.0 X-MS-PublicTrafficType: Email X-MS-TrafficTypeDiagnostic: CH0PR10MB5113:EE_|PH7PR10MB6508:EE_ X-MS-Office365-Filtering-Correlation-Id: dcac5adb-14f4-45d8-66f3-08dc7f62012c X-MS-Exchange-SenderADCheck: 1 X-MS-Exchange-AntiSpam-Relay: 0 X-Microsoft-Antispam: BCL:0;ARA:13230031|376005|366007|1800799015; X-Microsoft-Antispam-Message-Info: RAgS+0kzRTSh2MYXyeAa2JKWZysKyXWSdFLl0GYrdPgeLhSaaoS6VpfhvjYKXetsK7pubMZCUiFhpEGFo2E+jVItl1PcuUrADVnzZL+xJcM1DG3YOA/vq5yO7KknjahkV9IsFn3SxdTSdaD6s7Zl8caVPyk2GggYOG+KVtgxqXp2DitYrQumozYVaeRsBpj4FlgKYJVw/Sb/UGeWYZCxnwq1E8x8Bjs6eD0zO7hj+v8cOVUwd8kitCT6D8A41lhI8VmtiahoayweC5+95SDg+bmoy09ongMMsxvePbJAlqnnQZlGg5S6S19hJlNLka9Z/N6PiLOIO+0MIivuoStO+czCubaRG7Cqu7WbWamx+aciX4s7yJfGBxxOWsNgMFP+SieWeIPBcT2CVp8lx8CbiZ/GP2dlEobUXPna+cxdWP8ZKbd5CvtW7NwqSMZ5DP9ayE5NjgZOCvKbji5Vz9jgNRnwTuz977TTqsRQaY5iSEKAXKQTUGKZgXNovrDRZabpxrejh7vHUmtDwjjg7MkAvMjvvfqcW5jQ5vTJ19ejpN0k4yVVPU3U39GaRGpJIrNPpIEylq9XVhFjeeeuK5YNS8FLyRm4LmEp5g3lyTKsnDFz8IFeg9NAH67FntEPiXwMpxOgiyPL1In1yjmYVtZ9ii/8LKGQ8s0vGYT9lMrCESDSsxbeC5WmeeKcADLElDBSTkmc8zPevTGEZGdZH1d/tmnu1ZmovyArXLBpGQux58UDDujH0kXTIz1k+blJkFxPR08UhVPDRYfcoXAah0oXdbyW6f9j3sHJvFhoUHVFgNX0687TwZSspdcnym9YwOQVviXDAYsUMPim2R1BHbXNK7qxR6mHzdul9o3nCI2AUUk+BOHGMH+m5bfPwjzHHw0N4DrfRzT75jchfbhJsuhhl6zR9eVaBk6IKaNh20Mox8uCn4bKWQGF30vIfiXNCmlUBiMW8EiEN70UswDXvt13We/zP533uyP5EvewwQ67lVxlBwRE4r7GopmTjJWres0gCgl2c4b5ITmcr1qMXb2jlkoKETHWdlbjaTTBVaVXyV9M3DPWoLCDbqQnqEh6comknJqY7zHlISdCt5P0h7hl0lhJcp3DqhwrWY1lamDJWyQAzva1r+IslAqDOVdsz8wM0seYAkA39aq117HpzlwJ0XoH9iMuyjFnKazltOAdxxMCudvyliwwCZRQbLjyDGlJsV4D7QXPF1t378KXfki0lq5lXMldmAjiiX+yxZ6o0w4T6MaHTqfPbJcC9m7nRppJ4j1jNlnFHpg0bokr3RXhYA== 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:(13230031)(376005)(366007)(1800799015);DIR:OUT;SFP:1101; X-MS-Exchange-AntiSpam-MessageData-ChunkCount: 1 X-MS-Exchange-AntiSpam-MessageData-0: KcH+0J8GTPxPIPV8+B5rydcvCwCwsAb45KB1klaB/6FwmPeJhZiJo5whe6DhwfZ+9M0uIqGt4eh+6QEayaLIG6clDC7nSJ8M1LvJxzDnbm4VyXjHA0Be9R3DBr9BgRtC3FV35zbSjYjouamDBrFIg/7/nj94aqPskf3O8pzzdGDPpxo4uYZ/CJ4ijXgKs/EkbnnAsq3Nb8TZfk3LZF+Z7UqSR11Ztehk4ETYM/4grx1/XpdC/BAX/zUjOJzqL7B9ezDjSnOBzELvtY9DR+98n6a16KGe2jrRFW0Z4Zk2dWtExhC6Cd/rKNU4dgJZBEpoBzadD1zNnfH926hTW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d+pMqX3/xOJNgCSysBTPdk78iXAnbCCcnYHQk9US0SaTBD/vDYXSXyJIe11GWC0fOIMs/0nI0WEwLwPuOqB39daWz6wv+d5xrk/A+ztNlbz9/vIR/NTnihFrDTjHwFbjGFQOX4fTCTpl7ckgTt3bPzoAiNbydLUHTLNKeClrMVSpBu1XgA56HI5xlSUX/ScwHXHm7EpGtdrHNauvkmMEI7a0KaGNVAbz9fuj89BN8= X-MS-Exchange-AntiSpam-ExternalHop-MessageData-ChunkCount: 1 X-MS-Exchange-AntiSpam-ExternalHop-MessageData-0: Pk13FeVkZU9aXHG6I2sxr1EFkzcvCPXVncye4Y5OJxd/d0pvrUViuw2UzEXJkjO/1B8pcZYmYMBMRn0cK84F+zHQd708wE9c58/p2tnIvu4/sfnYP3Oc2/USqt8byQrX4hr5I8mJifcC8skJXLxSBNL8np16xt4n+A7c+Pi07Urk57sJf8sF/00pqi8aaeRFNVIJmMU97cM1/oNbic3cuVKHG0XlGus3fWZ0KF1vCVpsiuS7SJgL17uVUfiU445mPgUZh0yb57cBA+E2ZUgPfs3ckgzt64X1/u4d6ze+w9POvilFRJBhooxbI65AOQNA1xsOcMtNY1Zkdw7mqG5PIx4soFTboEy4T55nDLGuiXVzX10ow6Wf7GO8eUoIVtxCSx+Wu2I8IVRbh0glTvbM8+pgOXnNWP0zqLFMc5/GrgZ+dXB3B2XZO/3sTOdm0qhzKqzpEv6EdgOPML9M0ZdAiJ9FMH26qvDuc0hvjq9spj+hqg4uN1QJ8T5q8UjmMeRCrJD0aOe4tncqcQZwuOxFCyYGHyFBRx76D279P22l6Q0ZAXHfCoftVljod7k5L1P7ohaO7Nq9RFI+NCLiGHqKkUbaoyzcCbS3njXcFI2dL3I= X-OriginatorOrg: oracle.com X-MS-Exchange-CrossTenant-Network-Message-Id: dcac5adb-14f4-45d8-66f3-08dc7f62012c X-MS-Exchange-CrossTenant-AuthSource: CH0PR10MB5113.namprd10.prod.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Internal X-MS-Exchange-CrossTenant-OriginalArrivalTime: 28 May 2024 22:03:28.4906 (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: +glOkavfj4R1It8rtTCCptOKvNt/fPRm0iHW/KBQNUVHkwj+QGuNjbidEwkMQhqn4kjLmPlm2BRH9m9XdipMvBbr0Wdbi3BiACHVzp11JS0= X-MS-Exchange-Transport-CrossTenantHeadersStamped: PH7PR10MB6508 X-Proofpoint-Virus-Version: vendor=baseguard engine=ICAP:2.0.293,Aquarius:18.0.1039,Hydra:6.0.650,FMLib:17.12.28.16 definitions=2024-05-28_14,2024-05-28_01,2024-05-17_01 X-Proofpoint-Spam-Details: rule=notspam policy=default score=0 bulkscore=0 malwarescore=0 mlxscore=0 mlxlogscore=999 phishscore=0 spamscore=0 adultscore=0 suspectscore=0 classifier=spam adjust=0 reason=mlx scancount=1 engine=8.12.0-2405010000 definitions=main-2405280164 X-Proofpoint-GUID: E81Nk0iIyi89IwbtpdVjo63RbboL_uU7 X-Proofpoint-ORIG-GUID: E81Nk0iIyi89IwbtpdVjo63RbboL_uU7 X-Rspamd-Server: rspam05 X-Rspamd-Queue-Id: 5C2AF40012 X-Stat-Signature: 469cqnocyou4zjimcyd7xco15dizxb6w X-Rspam-User: X-HE-Tag: 1716933820-617193 X-HE-Meta: U2FsdGVkX1/EkZo6XK3Bag/DidB2xwgxChlEwcu42w8Ys1LpRncLlYNDBr7w11WxLStJXxRk/quROLfRj7agPUuwub0zT2V8d7EFVdhv8vYrX+lLVUzyMaMKR0rZpzTTgO4vwcJFzwI5wjfbdRYsKtbEmv8hiC2FtpekgojYesB45G0ibUVNhq6j03feUhrefQsMXM3E8oMk7eHTOdvZWSttwW6iYaNUShrWQsKafmbpxP+3jNvpIealO1LQij2rAn+nXnZP+qPVky1EhE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IGLKFLuVetYSJ4cI2uLQqXC9uFR9HXvk84TRQNWwTsY2bX9PxlKCewRvD7I2fYx1CsX3giJ7p+ZNmICvnki8ofdsrwI+TjHUcrOAAT51DgFoEx2Q== 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: List-Subscribe: List-Unsubscribe: By using a folio in scan_movable_pages(), we convert the last user of the page-based hugetlb meta-data macro functions to the folio version. After this conversion, we can safely remove the page-based definitions from include/linux/hugetlb.h. Signed-off-by: Sidhartha Kumar --- include/linux/hugetlb.h | 6 +----- mm/memory_hotplug.c | 9 +++++---- 2 files changed, 6 insertions(+), 9 deletions(-) diff --git a/include/linux/hugetlb.h b/include/linux/hugetlb.h index 15a58f69782c..279aca379b95 100644 --- a/include/linux/hugetlb.h +++ b/include/linux/hugetlb.h @@ -616,9 +616,7 @@ static __always_inline \ bool folio_test_hugetlb_##flname(struct folio *folio) \ { void *private = &folio->private; \ return test_bit(HPG_##flname, private); \ - } \ -static inline int HPage##uname(struct page *page) \ - { return test_bit(HPG_##flname, &(page->private)); } + } #define SETHPAGEFLAG(uname, flname) \ static __always_inline \ @@ -637,8 +635,6 @@ void folio_clear_hugetlb_##flname(struct folio *folio) \ #define TESTHPAGEFLAG(uname, flname) \ static inline bool \ folio_test_hugetlb_##flname(struct folio *folio) \ - { return 0; } \ -static inline int HPage##uname(struct page *page) \ { return 0; } #define SETHPAGEFLAG(uname, flname) \ diff --git a/mm/memory_hotplug.c b/mm/memory_hotplug.c index 431b1f6753c0..3573f39fbaa6 100644 --- a/mm/memory_hotplug.c +++ b/mm/memory_hotplug.c @@ -1731,7 +1731,8 @@ static int scan_movable_pages(unsigned long start, unsigned long end, unsigned long pfn; for (pfn = start; pfn < end; pfn++) { - struct page *page, *head; + struct page *page; + struct folio *folio; unsigned long skip; if (!pfn_valid(pfn)) @@ -1753,7 +1754,7 @@ static int scan_movable_pages(unsigned long start, unsigned long end, if (!PageHuge(page)) continue; - head = compound_head(page); + folio = page_folio(page); /* * This test is racy as we hold no reference or lock. The * hugetlb page could have been free'ed and head is no longer @@ -1761,9 +1762,9 @@ static int scan_movable_pages(unsigned long start, unsigned long end, * cases false positives and negatives are possible. Calling * code must deal with these scenarios. */ - if (HPageMigratable(head)) + if (folio_test_hugetlb_migratable(folio)) goto found; - skip = compound_nr(head) - (pfn - page_to_pfn(head)); + skip = folio_nr_pages(folio) - folio_page_idx(folio, page); pfn += skip - 1; } return -ENOENT;