From patchwork Thu May 30 17:14:27 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Sidhartha Kumar X-Patchwork-Id: 13680622 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 6E6BEC25B74 for ; Thu, 30 May 2024 17:14:51 +0000 (UTC) Received: by kanga.kvack.org (Postfix) id D44126B0096; Thu, 30 May 2024 13:14:50 -0400 (EDT) Received: by kanga.kvack.org (Postfix, from userid 40) id CF3F16B0099; Thu, 30 May 2024 13:14:50 -0400 (EDT) X-Delivered-To: int-list-linux-mm@kvack.org Received: by kanga.kvack.org (Postfix, from userid 63042) id B45EC6B009A; Thu, 30 May 2024 13:14:50 -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 984976B0096 for ; Thu, 30 May 2024 13:14:50 -0400 (EDT) Received: from smtpin21.hostedemail.com (a10.router.float.18 [10.200.18.1]) by unirelay07.hostedemail.com (Postfix) with ESMTP id 302BE16072D for ; Thu, 30 May 2024 17:14:50 +0000 (UTC) X-FDA: 82175711940.21.293115D Received: from mx0a-00069f02.pphosted.com (mx0a-00069f02.pphosted.com [205.220.165.32]) by imf04.hostedemail.com (Postfix) with ESMTP id AD70940005 for ; Thu, 30 May 2024 17:14:46 +0000 (UTC) Authentication-Results: imf04.hostedemail.com; dkim=pass header.d=oracle.com header.s=corp-2023-11-20 header.b=P6S1AHPh; dkim=pass header.d=oracle.onmicrosoft.com header.s=selector2-oracle-onmicrosoft-com header.b=xl6z5gf6; arc=pass ("microsoft.com:s=arcselector9901:i=1"); spf=pass (imf04.hostedemail.com: domain of sidhartha.kumar@oracle.com designates 205.220.165.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=1717089286; 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=Wm4QLbAXZlG9kdh2STD6pfP95yLX1fGvL/bq/SvpDsc=; b=UBzpXcLjFVKP7hCUJRZXPjP88sLSkCIYSkHWDwFqxq3cPD73LxqUwXXHsk95llGMNfD6sZ 1r1w0hs00MEO+nXOz+K1zJh0N8OLY4ZE+OLy+aHmNMV+qgB+mU9bRG0GkvWpqZN2J0zKWf dDeLV9iWpezs9Gc4rwKyCXNrZIJ5bcg= ARC-Authentication-Results: i=2; imf04.hostedemail.com; dkim=pass header.d=oracle.com header.s=corp-2023-11-20 header.b=P6S1AHPh; dkim=pass header.d=oracle.onmicrosoft.com header.s=selector2-oracle-onmicrosoft-com header.b=xl6z5gf6; arc=pass ("microsoft.com:s=arcselector9901:i=1"); spf=pass (imf04.hostedemail.com: domain of sidhartha.kumar@oracle.com designates 205.220.165.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=1717089286; a=rsa-sha256; cv=pass; b=hHTgF4nXKgBjhFuk0YTjpaotbD+DzXRlyQ7M2ImnAR2g4iHU+DmxFHgGBMPsk5pZL6oY3u yX6IpTM1p7X4uANVlHJThddYdE6cU6RduZ6JSTwmlpf4IOzvJl5OM48EIZuNjtQooUhoeI gnOvxmfmeUu2733i77qVRlZyqqqGvZY= Received: from pps.filterd (m0246617.ppops.net [127.0.0.1]) by mx0b-00069f02.pphosted.com (8.17.1.19/8.17.1.19) with ESMTP id 44UFRlBX003255; Thu, 30 May 2024 17:14:38 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=3DWm4QLbAXZlG9kdh2STD6pfP95yLX1fGvL/bq/?= =?utf-8?q?SvpDsc=3D=3B_b=3DP6S1AHPhhEMfz8+rHwtK0Wos2juemUgMiI/OcVLtC58nbhFf?= =?utf-8?q?D7IPdISnEnbt+icuB8F3_k0u4IzqKrUKgZk4e8yMOLjZ2gT04JHLC/4ajVewE4HPS?= =?utf-8?q?gAVJu0xSWUvC1XMmQn+Bb8hF_jIc1UFX3OYfiCXBDBILZhw0UnnwJzkCE3eGdKD5c?= =?utf-8?q?IzxzYqJMPFyYN+rABZORIkggXW46_av/es9f30rHl1QBKiqVQr1OEAdS52q1dXZbR?= =?utf-8?q?Tl8+zk57dILZ4osZ1Z57PirI2ZckT5Fa_En/qGzkdW+CjROh6K3cQbnVwUfrEffCu?= =?utf-8?q?Lv6DZDG6twVsZMWYP/4f7J6W7jz6Xradxahj_WQ=3D=3D_?= Received: from phxpaimrmta02.imrmtpd1.prodappphxaev1.oraclevcn.com (phxpaimrmta02.appoci.oracle.com [147.154.114.232]) by mx0b-00069f02.pphosted.com (PPS) with ESMTPS id 3yb8hu9kf3-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=OK); Thu, 30 May 2024 17:14:37 +0000 Received: from pps.filterd (phxpaimrmta02.imrmtpd1.prodappphxaev1.oraclevcn.com [127.0.0.1]) by phxpaimrmta02.imrmtpd1.prodappphxaev1.oraclevcn.com (8.17.1.19/8.17.1.19) with ESMTP id 44UGvlDn016210; Thu, 30 May 2024 17:14:37 GMT Received: from nam12-mw2-obe.outbound.protection.outlook.com (mail-mw2nam12lp2040.outbound.protection.outlook.com [104.47.66.40]) by phxpaimrmta02.imrmtpd1.prodappphxaev1.oraclevcn.com (PPS) with ESMTPS id 3yc50su17v-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=OK); Thu, 30 May 2024 17:14:37 +0000 ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=IfuSm6nPJMG9s1BCnHgZ7xCN18JyrYRyFLfakpI/LIQToHxXTC0W2FW5wKgaXf1j2zzPl+PYuBWkWGK8X5VbohXbcyKglxEYMd1rkSBKDRTI2fLjeA6ZPZB6vviUXubR0KwwQaX2UX5YUQh0J69gdThhp1erZgUnqYQuGOC+kSUoJqbBfsafBK+AsZlTaAlBMfn2DfuOZgfuKylvZBcdJfItKojhT6BGOFZeQpZKsNX1xpY9EM+CIinUvx1Ee25jLjZPcmhfDzQMhodHun3rLAJW+nSQfrn6+ZtJOd0ennKYjn4cIVDKwxA4TJ72wsDODDMqaCJlstLz/A3B1tgcGA== 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=Wm4QLbAXZlG9kdh2STD6pfP95yLX1fGvL/bq/SvpDsc=; b=gfqpHZwS5xvPziKeo5PE+X9cbtTAQl+5ygXJSa/lTLp4YBeVShdIO2T+li6bStRttoA/HA8BXyyxT9IP3jf2CmOF0VZ2xXWBgCVZQ5XXlGXv7btNLfC5s64fzWv8TEq95aBYf/K0VR+vjGMdK2tXW6qw8AVFoRGs1AG08OApONm9QIbiw8msS+Rgy58xAvlqJi4UTB6OdpQwW01RA31CNy18fomO3lGSH22HRyfGOwerAIZ53yMpdjZAeFci9a4QXcKlB1RcLwPAwo21Wy6f2shxGdUgEA4hgZ5xxYjtBf86MgRPeCsonJ4yZCQdwppHSI+HkioIraokDQInO6TuDg== 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=Wm4QLbAXZlG9kdh2STD6pfP95yLX1fGvL/bq/SvpDsc=; b=xl6z5gf6Bd75B9ntFHchlMzAoyqKJFHaa9EdUAN6B1bXjZAUBWeJSfNOTilHPgN04fwnwSE/qsXzy79qo7BNL2vHj5NWnWnx40eVtUi+vBj6UJ8jVazBj3Cio5WwAXvwNa+UyxVhSvfZ0lLmMKboNeNwWM9CFaFEH3haNUebVkI= Received: from CH0PR10MB5113.namprd10.prod.outlook.com (2603:10b6:610:c9::8) by PH7PR10MB6060.namprd10.prod.outlook.com (2603:10b6:510:1fc::6) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.7633.22; Thu, 30 May 2024 17:14:31 +0000 Received: from CH0PR10MB5113.namprd10.prod.outlook.com ([fe80::eab6:6dcc:f05f:5cb2]) by CH0PR10MB5113.namprd10.prod.outlook.com ([fe80::eab6:6dcc:f05f:5cb2%7]) with mapi id 15.20.7633.021; Thu, 30 May 2024 17:14:31 +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 v2] mm/hugetlb: mm/memory_hotplug: use a folio in scan_movable_pages() Date: Thu, 30 May 2024 10:14:27 -0700 Message-ID: <20240530171427.242018-1-sidhartha.kumar@oracle.com> X-Mailer: git-send-email 2.45.1 X-ClientProxiedBy: MN2PR16CA0065.namprd16.prod.outlook.com (2603:10b6:208:234::34) To CH0PR10MB5113.namprd10.prod.outlook.com (2603:10b6:610:c9::8) MIME-Version: 1.0 X-MS-PublicTrafficType: Email X-MS-TrafficTypeDiagnostic: CH0PR10MB5113:EE_|PH7PR10MB6060:EE_ X-MS-Office365-Filtering-Correlation-Id: c14a6e3b-cf1a-4d06-338d-08dc80cbf867 X-MS-Exchange-SenderADCheck: 1 X-MS-Exchange-AntiSpam-Relay: 0 X-Microsoft-Antispam: BCL:0;ARA:13230031|1800799015|376005|366007; X-Microsoft-Antispam-Message-Info: gfbsZDjy8kaYutIIVFZhRyU+YD+ZSZTu/YmthQgazqlvCOi6D92mXWF7gT8puIazcgADZPS4pti4VGQLqpoCWN5sRkt4cV7UGgkMM+RRXRH4kJjJEIkL0J7bXsZnh/B5L5+SUPRLjG9W5Jd8b/lvhW0HLM0VneyctUElLV8OSDLVkOWN/K8GTdq7v+Wt9wFn+r71c8h4hUKMcjvZxcOsVe6lI7e9EQuMbEPCVXGvEBtX8pGGgOoZB83Cs3OWhkAdz0yp5vgngcxdROQuTfhTEMvnML1TE5j7A5crtYEeXs21An4vvQswFL//kqUgomCGZbMGLk5Nkcz3+/xdgNdBGBWjIivLHizSlQi8BZCLY8RLiWi3QEg+I8vrlihb6MvBh4axO4QG7yiLwMhbPZYApHcgqDu7SfAY/7B5fJTmS3DY40Bsc8BeRWdNN9rj4MevnybMOCRc2h1k0Mf88UIPVGmZfumrcVldAJ2e+EDZLz9ixHyy1yAy5h+098bKmuW3rTvKYavnWYF33YNpxqApveSVu9ViZp8SERtt8g0eOwNfRzWYYacQhUqItpeKdGXLBq6SokRKArKlIP09EkUeR96eW0yFkkSxh2+SM8hDTfvHFDS+cQzdM98fzDnLnc13eoUCIWMw+9ucUVFJfvr2p7/5u/EeNCtRgcM8YcmapsdXOpEwUMNjjndyEO3Aya2CAZEtVKaIa6MzmWAVW/Q6gqILTeVM9k+spf0Arjp6BvvfxWgRcAnR7Hvt3zi1TIv52KJlf3SvyRg8KGdgoYNw4D4Off4UWgLlRfzMYr36d5HwZt86WQZK2EIeGdETZA8+++ZYrSMZc9lQARVssXKGVPrsiVSun3KvudqqWNUoNbp14wrG4bz6cbvKTUFpRC/EEUTQsxMGB6gK8EdUwxL7jWGpMY3f5rYA3ufIXO5UPx5Osd/ZGTWzTfoYtAbedefUrfzfK4TQG02Mf8nAGZiMEBXKKOZMF02Pw1+B4JOP6z4/pt+NrUobg+9SeJJQN7a2tv8Ldt1+QZpXaNg46+v/b3L3NFA4KCP2YhOmAbBWYS90RAdNvtNLFVtu5/yjVV1t/n7AIhD1CNgwUKlSwXGcD7smZvWzwJibZi9F4CzG7YdVZAC0LwV3NkPEuIoZkojIRfUu1ef3BurSYNMsvYrT0Ai5ehCdhiy/baQ8CMdpIIUi8AeoB3NeyZw9Biprm3FekZmh94LEmj2uJsCVpXZrdiFcuZfWKKX4pqU64YChc4rZ8GpTdH/pNEMbjyg7AfgYeSg+aXwNrHyMYsQbY/PUJA== 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)(1800799015)(376005)(366007);DIR:OUT;SFP:1101; X-MS-Exchange-AntiSpam-MessageData-ChunkCount: 1 X-MS-Exchange-AntiSpam-MessageData-0: VIBbf4Y97vykk6MyZR0rh+HT39LmS/ZxXbZfoq9kS2pfl6Oyv1wyHvhvlOpCv0fH5HuCnWWaTbA329jGVpU1SxnkwFUwOCRuF4ze6Y0zSP0MK6TqkM2WinwopaTADTmY5sS5xHCscUQSe1qRHgbCGRd4WoPXyjjuCHJkAQvJLxjoVhNTQLrb4vRbwlEJsUbQ+YVrItB3JxOanY5sSjgp8LFSlq4ci3Oi3vlGjqqhkToiXcOWRqn926vZnVMWhBww2C3DfuOtf696dd3sG7jmEUmwzOW/fxl78hk2EthPYPCPHirbT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mz/dPduLfRN3pIW7uR6xBO2Ma3PBRruNyV9Z+EHjMxX2cZY11fx1JVehZvVhwDJ5qvHU9vSnXvmVkdTCjJ3FV0p9wlLYs9uCM8FmWiaxy6E++PlUZzEirYyelll3l8ysYfGNm6a25oECl68gMGb4wZuz8hCInIMxo/9cKa7U5MZVQT0tlLAJmzGtt+yFSXrXeJCv6+cJwatF6KNWlxjCS5HtMAMxZ6f10fzK4pTTNSlJHIMKVndQXcsRrvdG02I= X-MS-Exchange-AntiSpam-ExternalHop-MessageData-ChunkCount: 1 X-MS-Exchange-AntiSpam-ExternalHop-MessageData-0: r6D8sjaMBPQsH1J0wH6KIaABzRcAM/56kQOfVWPqxLj5ISIztFhNtGcCKgaMQ8UpBWBxFWZYaQLBl0oSDStxlzp/nN0t4LGXu8UDHrVoroyxiF6XF7WuCvoKyBp5KbV4XgJ5fceDZDEpYFi3Chmto3Wq5Av3awQHQTgkjXzFuZosUZHoYRxOZlMolRwSc7+c4KnOTZYAChnFsKUeYVzq/ZxvD6N7iQiPdnB1ZvAey3etqSAmZLTs8Nmj/tSsr90D1OmqjgI8N57W93OSFkjZWKqzjITvlCTrQbtHx4atuVwoHCkO3m/O1be6ThteVxg4yK4mSSU1OcYTBnadfGp06pvo/Y3CYuVsAhjiCstlb9GKk23iiMBpmLS9yIV9qRfp7dnrvcJhdlfmeQXYUOd5XMPhzSnrbPvlgxZvHY54MRg/HcHUWDFmFedjPRYoMMUbNMiEGnAoX1kzJ3EDZwPSqTzA55iFPXu0GWqffEKuTIN9/tUDF1LrNwO7991cK+Mbnt4U6hGKXETZGKPngrTazuHdOmRS1ge/wJA45mX1GVhOHptDbnvQIyWEgCwu6PWt66kQRMOglllZxVRzmSunfHXWUSdxsyGLSHC0cZUlDjs= X-OriginatorOrg: oracle.com X-MS-Exchange-CrossTenant-Network-Message-Id: c14a6e3b-cf1a-4d06-338d-08dc80cbf867 X-MS-Exchange-CrossTenant-AuthSource: CH0PR10MB5113.namprd10.prod.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Internal X-MS-Exchange-CrossTenant-OriginalArrivalTime: 30 May 2024 17:14:31.5722 (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: 03J0WzpPt9KRChn3IJV47s/zohRH8JCojhfl2V5BAVE+OUit2y+v6knQ0BblRXXDiVVMjtmTmuHdcKONY7sS0sINdvqigAN4grvjgnk19FM= X-MS-Exchange-Transport-CrossTenantHeadersStamped: PH7PR10MB6060 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-30_13,2024-05-30_01,2024-05-17_01 X-Proofpoint-Spam-Details: rule=notspam policy=default score=0 mlxscore=0 spamscore=0 suspectscore=0 adultscore=0 phishscore=0 malwarescore=0 mlxlogscore=999 bulkscore=0 classifier=spam adjust=0 reason=mlx scancount=1 engine=8.12.0-2405010000 definitions=main-2405300127 X-Proofpoint-ORIG-GUID: 5aIngS1k0Gs4WVWGAHgbGe_FnU8F0uBR X-Proofpoint-GUID: 5aIngS1k0Gs4WVWGAHgbGe_FnU8F0uBR X-Rspam-User: X-Rspamd-Server: rspam09 X-Rspamd-Queue-Id: AD70940005 X-Stat-Signature: fuwoz8ck9e69fgor7498net19q436hfe X-HE-Tag: 1717089286-510054 X-HE-Meta: U2FsdGVkX18QQzm80pSZMD0T1XRnnoPi7XDakbFVAVtEeB52mM91pWeA8RFFO07e0eHMC5pPQTpjZaAA4JFgq18dug/D8Tz69UbJjDavbUaDjyjyn4sCNwhgxlnFeq1IClvWu0x7+K4bBVVupfHw+2SzcYgVoto2T2g0TixZ0b+GLE6MWChj9OsxeCgb4Sp4fr8BusgVfoGQ6/QVMLBflFzVXBPC+ddkwwc4qrewOXwYdGCzMOJ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GEMzRx9atfF3oBim6LZj6Kls1FK7OSwyzR2LejtJF5YnFqH6RkLhKqapW+j8JfSNX2qEhBC2eKJGxqKxLGPTk5vSZjATAY0/qmP6zHzu+v8CE79SYMSmAa0+bmg== 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 information 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 Acked-by: David Hildenbrand --- v1 -> v2: simplify pfn skipping logic with pfn |= folio_nr_pages(folio) - 1 per Matthew include/linux/hugetlb.h | 6 +----- mm/memory_hotplug.c | 11 +++++------ 2 files changed, 6 insertions(+), 11 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..9c36eb3bbd3b 100644 --- a/mm/memory_hotplug.c +++ b/mm/memory_hotplug.c @@ -1731,8 +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; - unsigned long skip; + struct page *page; + struct folio *folio; if (!pfn_valid(pfn)) continue; @@ -1753,7 +1753,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,10 +1761,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)); - pfn += skip - 1; + pfn |= folio_nr_pages(folio) - 1; } return -ENOENT; found: