From patchwork Fri Jan 13 22:30:55 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Sidhartha Kumar X-Patchwork-Id: 43641 Return-Path: Delivered-To: ouuuleilei@gmail.com Received: by 2002:adf:eb09:0:0:0:0:0 with SMTP id s9csp11615wrn; Fri, 13 Jan 2023 14:33:31 -0800 (PST) X-Google-Smtp-Source: AMrXdXvfyuyQEOJpiqMEWRUc7ecnqVX7ual9R8nPOugoBNgbay51iMLhujnAKrArL7zA8eQur3bR X-Received: by 2002:a17:907:6d0c:b0:7c1:652:d109 with SMTP id sa12-20020a1709076d0c00b007c10652d109mr87294388ejc.35.1673649211346; Fri, 13 Jan 2023 14:33:31 -0800 (PST) ARC-Seal: i=2; a=rsa-sha256; t=1673649211; cv=pass; d=google.com; s=arc-20160816; b=RHXgciuMfjdg4C8+pHrCzsOO4Fx5Qsrnpuoee4Qc4v0p1ylFK6kfjtehetZMSitB6m 62XpVuHJ/fZVfP8z8SZ6iU2NJsUJJY+bpQx+wqotE6alUd6hY8/usPrZa/ks7smLfZVd Lja35c0AuVqxkg/TIAuGx1EIj0kSuI2nKxAKWI9CJNhn83LN+THgP7DiiGsD4TDW3mNN 8TAiTjBLYpRP5Onpi6CZY7xR0S9PO5ARRLBsx8BRZRgujjJ+CYvsMd6hqvVRXanlFTVI 9jgZvsKwgOObfd/Q2obga+qKTyt4iDPUFCtVG2orS0jJRqhoxWufeR4ZX+MU+hBH253e bNiA== 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=/QULkUox5rmihInJovSFDI1yjAOFhDzEXSOdbMBjXi8=; b=BMVqtkqTSWVQ7/r0120kJe4/+qWHnGtW4L4xAHgTaJN/9vJc3PficdR2hJQDzyljvy djs1paO+0HRdxwPphEQj5SnL+5SKoatHu1POk1MbVcW8nbJiHMyB+YQprFR51nfDH2/s cTTyBVMyp4SD9WSuF5IR6RLeYwx0sGg3FZzdf8ShCQTMbmRqUPWDUNFmHysYawZPBuU7 62lPW8qkgnOFcvPr2SAqsvDdTqVb1t0GO2Qs8b1KMhdNqkl1JZJ/d6zSGvf0qXPh9Jmz LF75kImBbq3U7BoXpautZiY/oZRPT67toylFbmLRDvR8NvcVkrnAs42BWWoV7YF8+gnB u+dQ== ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@oracle.com header.s=corp-2022-7-12 header.b=iLFI+vkU; dkim=pass header.i=@oracle.onmicrosoft.com header.s=selector2-oracle-onmicrosoft-com header.b=kW246ouD; 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 g25-20020a170906595900b0080e1b35ebbcsi19465895ejr.453.2023.01.13.14.33.08; Fri, 13 Jan 2023 14:33:31 -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=iLFI+vkU; dkim=pass header.i=@oracle.onmicrosoft.com header.s=selector2-oracle-onmicrosoft-com header.b=kW246ouD; 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 S229883AbjAMWcB (ORCPT + 99 others); Fri, 13 Jan 2023 17:32:01 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:36504 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229379AbjAMWbp (ORCPT ); Fri, 13 Jan 2023 17:31:45 -0500 Received: from mx0a-00069f02.pphosted.com (mx0a-00069f02.pphosted.com [205.220.165.32]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 6C9A076EC8 for ; Fri, 13 Jan 2023 14:31:44 -0800 (PST) Received: from pps.filterd (m0333521.ppops.net [127.0.0.1]) by mx0b-00069f02.pphosted.com (8.17.1.19/8.17.1.19) with ESMTP id 30DK47Qt017331; Fri, 13 Jan 2023 22:31:15 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=/QULkUox5rmihInJovSFDI1yjAOFhDzEXSOdbMBjXi8=; b=iLFI+vkUqFXATgbCM7wRE78BgT6H49s2Q/Uti8bH6Q1Ha8G3PrKC/h2TfPC/xrMDQtzh YohNFKVaYkbheuc1vhvdaogbwkxXsNfIdOWfygmuHN0i+y8tIXJ/uM33hJ7ecbxP17zd d04l70T/phwWDYYqgNwR+rZNw44c0w9JpkzimNHJlr9/MN3+YXDZzGbHuw0ldWJvq1tn 0hnWA7e+fDdFAbYB3yccnsnRGZSjf9mypZBC4uqf/FmBm4QzwVoUhLj7jbr74toMFBQa B4VzKHKshdMvFdoKGSGgC2n/cht901omCyX4iPhsP5LRnT9HUUTicvn3Vb9GCjG4yPcn 5A== Received: from phxpaimrmta02.imrmtpd1.prodappphxaev1.oraclevcn.com (phxpaimrmta02.appoci.oracle.com [147.154.114.232]) by mx0b-00069f02.pphosted.com (PPS) with ESMTPS id 3n3dxhr9xh-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=OK); Fri, 13 Jan 2023 22:31:15 +0000 Received: from pps.filterd (phxpaimrmta02.imrmtpd1.prodappphxaev1.oraclevcn.com [127.0.0.1]) by phxpaimrmta02.imrmtpd1.prodappphxaev1.oraclevcn.com (8.17.1.5/8.17.1.5) with ESMTP id 30DKwdPU006693; Fri, 13 Jan 2023 22:31:15 GMT Received: from nam11-co1-obe.outbound.protection.outlook.com (mail-co1nam11lp2177.outbound.protection.outlook.com [104.47.56.177]) by phxpaimrmta02.imrmtpd1.prodappphxaev1.oraclevcn.com (PPS) with ESMTPS id 3n3etdjktp-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=OK); Fri, 13 Jan 2023 22:31:14 +0000 ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=VpwIQYacfImDES80svwpo4TGMzmcKnZHIDH15IxyUjbz6Q0GbV0bU6vO0w0yrmVlaUC/rQ9jW+6MnXFuWDM85Hjj7rCq0nBQJ0KERBiBFXbjhm2VBn3xbF8Z04mP2YdBIv1TqLwbwXhfSEa9TOj8Sk9LC6J97TOLh8AWhnJzj+D05dbS6h+H36mSiDMZ1N2W0D+m2DhLeWeBJL1ndb/En1+SEMStjHJaHmRIcaQv9I7+aS/wPiLF8VQp/uMprZhxEy3e09hCD7Pfnup2LSRTqQzOdTljuEj+hyAUVVeyDv9tNQqs+8XIb5hU9X4idMNVUVbG4FlT9+i9fUQYSIPGuQ== 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=/QULkUox5rmihInJovSFDI1yjAOFhDzEXSOdbMBjXi8=; b=cfRk4baA57e5YfF/Oho5BfKvg3oAYi9ffgq/ItHGAzM7dF88X/N6e4ZW/Sh6QU2JVnPxwHlDz1I+uvUmhxx4FyPKBlURje3nE0NUhqdqaVS+OPbWigfUnycKydiBzIm4BPyCSwSBLQ7+UIeg2BKOczBHCGGXg63lyc4Q2dlnqf++I/SooLJuRhGnqTVOYEJ+P2R055aGbShAIzhUxse8u0oAExfukh98z5gMMwe0+BExZs4TAuepbEllJn4KyK/QF4HvGzuzlmHTjlt0agd2Bydm3j2TDgZwxQwlwxKnfJZt2BLys+IpkNgVdAexBmSoXXBo0TfTBJwX4i9m3iGQmg== 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=/QULkUox5rmihInJovSFDI1yjAOFhDzEXSOdbMBjXi8=; b=kW246ouD5xIROEDXsbwVEafuJ8oL8MQAZpbmfW8tlomQbUnZa+a3OsGa8YjzQzaRej1KpSUvBE4OoqNp76NxdA0NZOuTNKQqpXloaoPxy84bfdW/J+M+fzIaLPU0Kg1kSuTaPgIKi+kuoebDWXcye5s2esvCZWZo2+Q/KrRnEH4= Received: from DS7PR10MB5117.namprd10.prod.outlook.com (2603:10b6:5:3a6::17) by IA0PR10MB7326.namprd10.prod.outlook.com (2603:10b6:208:40d::18) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.6002.12; Fri, 13 Jan 2023 22:31:12 +0000 Received: from DS7PR10MB5117.namprd10.prod.outlook.com ([fe80::93ca:e22f:aa6d:94d9]) by DS7PR10MB5117.namprd10.prod.outlook.com ([fe80::93ca:e22f:aa6d:94d9%2]) with mapi id 15.20.6002.011; Fri, 13 Jan 2023 22:31:12 +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, jhubbard@nvidia.com, Sidhartha Kumar Subject: [PATCH mm-unstable v3 6/8] mm/hugetlb: convert alloc_migrate_huge_page to folios Date: Fri, 13 Jan 2023 16:30:55 -0600 Message-Id: <20230113223057.173292-7-sidhartha.kumar@oracle.com> X-Mailer: git-send-email 2.39.0 In-Reply-To: <20230113223057.173292-1-sidhartha.kumar@oracle.com> References: <20230113223057.173292-1-sidhartha.kumar@oracle.com> X-ClientProxiedBy: CH0PR03CA0199.namprd03.prod.outlook.com (2603:10b6:610:e4::24) To DS7PR10MB5117.namprd10.prod.outlook.com (2603:10b6:5:3a6::17) MIME-Version: 1.0 X-MS-PublicTrafficType: Email X-MS-TrafficTypeDiagnostic: DS7PR10MB5117:EE_|IA0PR10MB7326:EE_ X-MS-Office365-Filtering-Correlation-Id: 03c70bdf-fb1f-4636-60ee-08daf5b5e00b X-MS-Exchange-SenderADCheck: 1 X-MS-Exchange-AntiSpam-Relay: 0 X-Microsoft-Antispam: BCL:0; X-Microsoft-Antispam-Message-Info: s5idka6sIibe0a8L2kII7BC/x1/ueSCov7s8o7QoIf7nArJZMJRdoOCYn14OEamjoPihBdH05tgFKjCtTDnoqyH/jXGYMN7FKlPPpjcqN6IvGUO5C7aB4KHVcBDaOvGJFGJRN7qHTNN8RNc3r5w1WMq92ovQk/VUQ/BRYZiEKk7VG5lnFCWafdtVUQWYyvYUy2jYZuSYd1JMEBxfIgo9xLwvCDrgvOlvfw6e2Wujii3wh/UcJ5cfmYHhpHd7pRgxlEWSdyfg9qqAl9WamLdzX35dBot/IuUVVrLWvFuoDPnpzhmpOlPgX29bLNH9iraTLSrYYv1G36DZBIFmREvGHdKOQnFwegKhOZRmXZcEkPDmE4PxryRIDHxUCvLO5aTfy1NFag9A0O+yGmcF0I84qzM63R8/XocJ7qNW4XnROlkN+GTVyLBPmm5qAVAMQ3lWBehcA6fkiCA+18klLYLGsBJEzXQPMc791xGcgbcIF8CrhppomSbncHZ5EoVY/Tle612ZhrbR1/loItIG1UBp7SwaJFYu0OV7SJYS0rL24nQFP1udXOv64A/k+EVHapxNwjTw0tU6VmCsJOgIjZKGSX5mfpjn/thKJoPfzqIiainwDKXe7bOcBmlKRQ/mNvN5uvHuN9+1lL9Fc4ANCatmxb+61wK4IutZ5K8kEEyHTwBp0o4O5TgKRwaHEVEG/6e2 X-Forefront-Antispam-Report: CIP:255.255.255.255;CTRY:;LANG:en;SCL:1;SRV:;IPV:NLI;SFV:NSPM;H:DS7PR10MB5117.namprd10.prod.outlook.com;PTR:;CAT:NONE;SFS:(13230022)(366004)(396003)(346002)(39860400002)(376002)(136003)(451199015)(83380400001)(44832011)(38100700002)(86362001)(2906002)(41300700001)(8936002)(5660300002)(6666004)(107886003)(478600001)(6506007)(1076003)(2616005)(26005)(186003)(6512007)(8676002)(66556008)(316002)(4326008)(66946007)(6486002)(66476007)(36756003)(14583001);DIR:OUT;SFP:1101; X-MS-Exchange-AntiSpam-MessageData-ChunkCount: 1 X-MS-Exchange-AntiSpam-MessageData-0: On0CBKCY/2wAeT1JLFLoF5AqaNEE4qvbwY/eos4Jt214WjxIkiJi7fFA4CYMFOiMmSqoM83tI7v/wazLwFvXQWOMe3gX4sU4bxq5Yu9zPPGFKtErPAqNWHKCtvesZkdCbjL4v4Lz/dKKGxQiLcG9rYVMamIeutmFOfJxmAttfBGT5DZO445ZlOBeAAMNBYGycE9MMjFPhkmyWmlXry+gxRo6kX+O/cOXK3Vr+nc+puyvW05+6dVSjsuLtKr3RpHBe9EY9QRAOoExQg88dZ9J0YNyjf4hjHQqIY3tunQwmMJWaD9b7zYZiuApPgCn4WaRRjUuP1L9ywnIg1T4Q4TmxPZYlXTrsmreZmGQRXSw5oFn54pOhHkgQIqauAQ4IQrsCLw1RX2jjBb2Hx6luDjpCVc+6rFnm8zmwgrF70tk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sstSGaoSoyjJDcan5jrPvUTY+6G8lOlvos7VuU4sUmvZCmFOggeQE1PwHkYhgbjfhXPpoIhgSOzl X-OriginatorOrg: oracle.com X-MS-Exchange-CrossTenant-Network-Message-Id: 03c70bdf-fb1f-4636-60ee-08daf5b5e00b X-MS-Exchange-CrossTenant-AuthSource: DS7PR10MB5117.namprd10.prod.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Internal X-MS-Exchange-CrossTenant-OriginalArrivalTime: 13 Jan 2023 22:31:12.4480 (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: yGlEtD9Ku/4TAo6IYCBlqMraL8XB1bkn/4b59Wtt6QT0DyrqRedyWjbJBjaYKQH9qsWfthMMaVL1qBRGspkMi6S/TYjTGa24KplPs+/jh/4= X-MS-Exchange-Transport-CrossTenantHeadersStamped: IA0PR10MB7326 X-Proofpoint-Virus-Version: vendor=baseguard engine=ICAP:2.0.219,Aquarius:18.0.923,Hydra:6.0.562,FMLib:17.11.122.1 definitions=2023-01-13_10,2023-01-13_02,2022-06-22_01 X-Proofpoint-Spam-Details: rule=notspam policy=default score=0 mlxscore=0 bulkscore=0 adultscore=0 phishscore=0 malwarescore=0 suspectscore=0 spamscore=0 mlxlogscore=999 classifier=spam adjust=0 reason=mlx scancount=1 engine=8.12.0-2212070000 definitions=main-2301130154 X-Proofpoint-GUID: ncM5SHMg8SEG6cti6XMu2woIi0VAkiXF X-Proofpoint-ORIG-GUID: ncM5SHMg8SEG6cti6XMu2woIi0VAkiXF 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?1754948395440173501?= X-GMAIL-MSGID: =?utf-8?q?1754948395440173501?= Change alloc_huge_page_nodemask() to alloc_hugetlb_folio_nodemask() and alloc_migrate_huge_page() to alloc_migrate_hugetlb_folio(). Both functions now return a folio rather than a page. Signed-off-by: Sidhartha Kumar Reviewed-by: Mike Kravetz --- include/linux/hugetlb.h | 6 +++--- mm/hugetlb.c | 18 +++++++++--------- mm/migrate.c | 5 ++++- 3 files changed, 16 insertions(+), 13 deletions(-) diff --git a/include/linux/hugetlb.h b/include/linux/hugetlb.h index 482929b2d044..a853c13d8308 100644 --- a/include/linux/hugetlb.h +++ b/include/linux/hugetlb.h @@ -680,7 +680,7 @@ struct huge_bootmem_page { int isolate_or_dissolve_huge_page(struct page *page, struct list_head *list); struct page *alloc_huge_page(struct vm_area_struct *vma, unsigned long addr, int avoid_reserve); -struct page *alloc_huge_page_nodemask(struct hstate *h, int preferred_nid, +struct folio *alloc_hugetlb_folio_nodemask(struct hstate *h, int preferred_nid, nodemask_t *nmask, gfp_t gfp_mask); struct page *alloc_huge_page_vma(struct hstate *h, struct vm_area_struct *vma, unsigned long address); @@ -1001,8 +1001,8 @@ static inline struct page *alloc_huge_page(struct vm_area_struct *vma, return NULL; } -static inline struct page * -alloc_huge_page_nodemask(struct hstate *h, int preferred_nid, +static inline struct folio * +alloc_hugetlb_folio_nodemask(struct hstate *h, int preferred_nid, nodemask_t *nmask, gfp_t gfp_mask) { return NULL; diff --git a/mm/hugetlb.c b/mm/hugetlb.c index f3e1d052b40c..c0cfb075cd58 100644 --- a/mm/hugetlb.c +++ b/mm/hugetlb.c @@ -2275,7 +2275,7 @@ static struct folio *alloc_surplus_hugetlb_folio(struct hstate *h, return folio; } -static struct page *alloc_migrate_huge_page(struct hstate *h, gfp_t gfp_mask, +static struct folio *alloc_migrate_hugetlb_folio(struct hstate *h, gfp_t gfp_mask, int nid, nodemask_t *nmask) { struct folio *folio; @@ -2295,7 +2295,7 @@ static struct page *alloc_migrate_huge_page(struct hstate *h, gfp_t gfp_mask, */ folio_set_hugetlb_temporary(folio); - return &folio->page; + return folio; } /* @@ -2328,8 +2328,8 @@ struct folio *alloc_buddy_hugetlb_folio_with_mpol(struct hstate *h, return folio; } -/* page migration callback function */ -struct page *alloc_huge_page_nodemask(struct hstate *h, int preferred_nid, +/* folio migration callback function */ +struct folio *alloc_hugetlb_folio_nodemask(struct hstate *h, int preferred_nid, nodemask_t *nmask, gfp_t gfp_mask) { spin_lock_irq(&hugetlb_lock); @@ -2340,12 +2340,12 @@ struct page *alloc_huge_page_nodemask(struct hstate *h, int preferred_nid, preferred_nid, nmask); if (folio) { spin_unlock_irq(&hugetlb_lock); - return &folio->page; + return folio; } } spin_unlock_irq(&hugetlb_lock); - return alloc_migrate_huge_page(h, gfp_mask, preferred_nid, nmask); + return alloc_migrate_hugetlb_folio(h, gfp_mask, preferred_nid, nmask); } /* mempolicy aware migration callback */ @@ -2354,16 +2354,16 @@ struct page *alloc_huge_page_vma(struct hstate *h, struct vm_area_struct *vma, { struct mempolicy *mpol; nodemask_t *nodemask; - struct page *page; + struct folio *folio; gfp_t gfp_mask; int node; gfp_mask = htlb_alloc_mask(h); node = huge_node(vma, address, gfp_mask, &mpol, &nodemask); - page = alloc_huge_page_nodemask(h, node, nodemask, gfp_mask); + folio = alloc_hugetlb_folio_nodemask(h, node, nodemask, gfp_mask); mpol_cond_put(mpol); - return page; + return &folio->page; } /* diff --git a/mm/migrate.c b/mm/migrate.c index 6932b3d5a9dd..fab706b78be1 100644 --- a/mm/migrate.c +++ b/mm/migrate.c @@ -1622,6 +1622,7 @@ struct page *alloc_migration_target(struct page *page, unsigned long private) struct migration_target_control *mtc; gfp_t gfp_mask; unsigned int order = 0; + struct folio *hugetlb_folio = NULL; struct folio *new_folio = NULL; int nid; int zidx; @@ -1636,7 +1637,9 @@ struct page *alloc_migration_target(struct page *page, unsigned long private) struct hstate *h = folio_hstate(folio); gfp_mask = htlb_modify_alloc_mask(h, gfp_mask); - return alloc_huge_page_nodemask(h, nid, mtc->nmask, gfp_mask); + hugetlb_folio = alloc_hugetlb_folio_nodemask(h, nid, + mtc->nmask, gfp_mask); + return &hugetlb_folio->page; } if (folio_test_large(folio)) {