From patchwork Thu Apr 11 16:47:56 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Sidhartha Kumar X-Patchwork-Id: 13626389 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 0B560C4345F for ; Thu, 11 Apr 2024 16:48:34 +0000 (UTC) Received: by kanga.kvack.org (Postfix) id 7DAB06B009F; Thu, 11 Apr 2024 12:48:34 -0400 (EDT) Received: by kanga.kvack.org (Postfix, from userid 40) id 78A426B00AA; Thu, 11 Apr 2024 12:48:34 -0400 (EDT) X-Delivered-To: int-list-linux-mm@kvack.org Received: by kanga.kvack.org (Postfix, from userid 63042) id 5DCD56B00B0; Thu, 11 Apr 2024 12:48:34 -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 3867E6B009F for ; Thu, 11 Apr 2024 12:48:34 -0400 (EDT) Received: from smtpin20.hostedemail.com (a10.router.float.18 [10.200.18.1]) by unirelay01.hostedemail.com (Postfix) with ESMTP id F05D31C1140 for ; Thu, 11 Apr 2024 16:48:33 +0000 (UTC) X-FDA: 81997834506.20.7DC546C Received: from mx0b-00069f02.pphosted.com (mx0b-00069f02.pphosted.com [205.220.177.32]) by imf08.hostedemail.com (Postfix) with ESMTP id CEE1A16000B for ; Thu, 11 Apr 2024 16:48:29 +0000 (UTC) Authentication-Results: imf08.hostedemail.com; dkim=pass header.d=oracle.com header.s=corp-2023-11-20 header.b=gbPQ6J0x; dkim=pass header.d=oracle.onmicrosoft.com header.s=selector2-oracle-onmicrosoft-com header.b=igGfgZjm; spf=pass (imf08.hostedemail.com: domain of sidhartha.kumar@oracle.com designates 205.220.177.32 as permitted sender) smtp.mailfrom=sidhartha.kumar@oracle.com; arc=pass ("microsoft.com:s=arcselector9901:i=1"); 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=1712854109; 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=f8sFCY5eMzQx1lPLAsWTqrbAVgNkmlOdQ7rrLKpK2HA=; b=yNDHrfAQje0BG1jbqlQJGiSYiLdwDTZV3vfCCGbpUV//L2lIXnasc87C4LKtScv6JcnXEZ a2Mm5E2VXgqeL5R8AteWKvT3/PskiJnwX3+vS374gdYy99j8O9L8zIgolQx4PVs6kU+yKZ y/fpxPkw3XUJ8DW2Kjsg0YZxSsZP/qA= ARC-Authentication-Results: i=2; imf08.hostedemail.com; dkim=pass header.d=oracle.com header.s=corp-2023-11-20 header.b=gbPQ6J0x; dkim=pass header.d=oracle.onmicrosoft.com header.s=selector2-oracle-onmicrosoft-com header.b=igGfgZjm; spf=pass (imf08.hostedemail.com: domain of sidhartha.kumar@oracle.com designates 205.220.177.32 as permitted sender) smtp.mailfrom=sidhartha.kumar@oracle.com; arc=pass ("microsoft.com:s=arcselector9901:i=1"); dmarc=pass (policy=quarantine) header.from=oracle.com ARC-Seal: i=2; s=arc-20220608; d=hostedemail.com; t=1712854109; a=rsa-sha256; cv=pass; b=5hq6aTevRgw7JUnXZNKptmcTkfWQImKUbIghbuEiuYaB7boapEpXls6Z7Yw7PXWcpq7umm gzLQv6Is//vHFY6rn0PXcRG/SRODA2BFyG5lcxG+W+hhXVqzqorZSD8LLZnb/gYcp6/q9T KnttYIKdq0y+DF3m1w+0iZ92KB1LJQk= Received: from pps.filterd (m0246632.ppops.net [127.0.0.1]) by mx0b-00069f02.pphosted.com (8.17.1.19/8.17.1.19) with ESMTP id 43BGYdf2017899; Thu, 11 Apr 2024 16:48:05 GMT DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=oracle.com; h=from : to : cc : subject : date : message-id : content-transfer-encoding : content-type : mime-version; s=corp-2023-11-20; bh=f8sFCY5eMzQx1lPLAsWTqrbAVgNkmlOdQ7rrLKpK2HA=; b=gbPQ6J0xgXKCA5OZijsfQeSYQx+QegNRna/ntMVcKZcVXUsXmSCNtL4uY5wISc41Czc0 JojtetCuIZjbZM3PbKuwvl32o/MIjKdfzPqExyKT+l2a6N6VsnlVcsZ3jtfek6+mdHF6 js+YgMtuRp87Mf4kXrzjRfPy8Fx/8xgPAUJg1Se5DPxqZhSEBj/jjUHxzGYHzzlQVc+7 Pd9SY/H0KCdNp6d/C1VJ1q8fzjhwW0UucWsSoDAFIUQdSdmn6/r0wj9bHyhCqYeQ3mAg Ln6UqtdZksVELEIxapSzGZVuOzNkVtVc109OOYxhJb/6D/HQDAFFdLiGav0kkiptn/NX Xg== Received: from phxpaimrmta02.imrmtpd1.prodappphxaev1.oraclevcn.com (phxpaimrmta02.appoci.oracle.com [147.154.114.232]) by mx0b-00069f02.pphosted.com (PPS) with ESMTPS id 3xax0ut30j-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=OK); Thu, 11 Apr 2024 16:48:05 +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 43BG7g5T010830; Thu, 11 Apr 2024 16:48:04 GMT Received: from nam10-bn7-obe.outbound.protection.outlook.com (mail-bn7nam10lp2100.outbound.protection.outlook.com [104.47.70.100]) by phxpaimrmta02.imrmtpd1.prodappphxaev1.oraclevcn.com (PPS) with ESMTPS id 3xavu9su2r-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=OK); Thu, 11 Apr 2024 16:48:04 +0000 ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=E+7vDySWAGQBjZTvH7YCF4Zcj7I0J7HA+N6ffx6HvSN8UFVbizjCg6VcuBhJCiBzss9fvx6r2+SK715kN/BjXSjbJJyHA2Ifuk7+zscv7eamsLYIbOLvBv0+lbGSA61Bjha/55YVASdsIDuh6nhPZE8NamwgIBQGuOpUyJ9ejS4X8r5NkKAYnrdiqDXKMow4DG8Qj1ljmoSmB5QxcIeW1QgGav1NalbrOgBbsyBcwEFj7jBufACqtQXpbwlVbmE4jhAdm11K7YWc1SYDaxNtBgPKEZUrvqhKqrZ90sh//cJogVEZqLbv0WtpHZPgtqDvs6cp/MHGXbutVs2rVG5c7g== 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=f8sFCY5eMzQx1lPLAsWTqrbAVgNkmlOdQ7rrLKpK2HA=; b=RQkCobPpNBKIUSxn8z1tBlD9kzfZk2en+tan9yDhuLgSW/OlevfM40Etf+OD+TnbECpNDrGiPnePfFBvqeJ9MmFS263esr2qROzAJTqlTfgAc+aerMQrGmMlyuOlHH/c+nEec8n+uaiAwcjobi4COBK+f2rbPZ8eVkJEGBTz297eY7Xy39UwCOb8Pqyk/700pgDs0Yonz1sy3MgZhbNKEbihPCVP9a+YnFgAP/17F+yM6/KngXgv3xK/22BCLhP5KWukk0jLEhaIRdTCYGc0zO6+p9wv9BX79fx/MvQc6RJzCzha8t5OrkeowNoZfni70BXzHd6OxufKUG3OJ/2+ow== 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=f8sFCY5eMzQx1lPLAsWTqrbAVgNkmlOdQ7rrLKpK2HA=; b=igGfgZjmqRIHZUn4An51ViAU6kYKhzpQiY1NpuhqKS/TiiaVYn0XHnWWylWv0el7y2WbgAqSdFCbNRlel2nOvtg4yAswpm68nvLt+1LmBcEsTGogooo9rS+JayKYlPfAiuj0EgOmQl15wXIgkV6up83fOUpGuAb1cKa3vFvB0yE= Received: from CH0PR10MB5113.namprd10.prod.outlook.com (2603:10b6:610:c9::8) by CY8PR10MB6827.namprd10.prod.outlook.com (2603:10b6:930:9e::18) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.7409.46; Thu, 11 Apr 2024 16:48:01 +0000 Received: from CH0PR10MB5113.namprd10.prod.outlook.com ([fe80::6573:ea04:fecc:cc68]) by CH0PR10MB5113.namprd10.prod.outlook.com ([fe80::6573:ea04:fecc:cc68%5]) with mapi id 15.20.7409.042; Thu, 11 Apr 2024 16:48:01 +0000 From: Sidhartha Kumar To: linux-kernel@vger.kernel.org, linux-mm@kvack.org Cc: akpm@linux-foundation.org, willy@infradead.org, linmiaohe@huawei.com, jane.chu@oracle.com, muchun.song@linux.dev, nao.horiguchi@gmail.com, Sidhartha Kumar Subject: [PATCH] mm/hugetlb: convert dissolve_free_huge_pages() to folios Date: Thu, 11 Apr 2024 09:47:56 -0700 Message-ID: <20240411164756.261178-1-sidhartha.kumar@oracle.com> X-Mailer: git-send-email 2.44.0 X-ClientProxiedBy: CH2PR16CA0014.namprd16.prod.outlook.com (2603:10b6:610:50::24) To CH0PR10MB5113.namprd10.prod.outlook.com (2603:10b6:610:c9::8) MIME-Version: 1.0 X-MS-PublicTrafficType: Email X-MS-TrafficTypeDiagnostic: CH0PR10MB5113:EE_|CY8PR10MB6827:EE_ X-MS-Office365-Filtering-Correlation-Id: 59857892-9d1c-42cb-0886-08dc5a47265b X-MS-Exchange-SenderADCheck: 1 X-MS-Exchange-AntiSpam-Relay: 0 X-Microsoft-Antispam: BCL:0; X-Microsoft-Antispam-Message-Info: Z2GJRAGN3p5LPCiQ0t9jPGxyKM99Q9Ld6UnEC64tSHYrlZL8SUriqMm7jgJAyCboQalOcRvXQ2dgEIXyMZ5+oqpY9D5Ayi0gLMEQPSQyinMGL4qZlCNEd0QUFJAF92CB9H4pRHLVN04iDTFYJKGFi2qnToWez64Bh/T/V4T9edriII93jyFAUvX6ycYB6ZtEnrbRFQdqlE89BYCueFKo4gijIpYQc3uDCRY5CbeOTjU+rffm/JqWW4Ud7fytufzmynywDBPa+T0qPysUpe5VqmTjMUK9sndHE81VYywIX0Iw0ax2QqOR9wOZyojNQQoOLTZfnV4qPe0hd85YGB8M6xe35vt6ev//DB4ahwORqwUo9v8yM1cbVfsdsafXnwIBojEf5OuFt37MhCw72MXmL8LSa6DBG6PhWHJ0hRsG9jZlyQ1kDKh/OtfdIBn9tv8eBCze1AT8fNpSnE/OL2yqpVoP34/L6bcjplXiLDaTRhJRMpQ7r050Qj1VieVby2RVaIBhV6vw+WRxJPd8sTezR4myHnTL8RuD18XHb/OFwRz4NhQkR/PUs1BVaP9Lpc/jWTWo+iZtK8PLDTXUeFBvtKnzSZUAuX3MZNhHrzilqgJLWpufbhR4LHd0DD4bAKQl9tAaC4VkMmCrpEwfahC/HNs7RKm0N7Y2aTPpD4Wlvpk= 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)(366007)(376005)(1800799015);DIR:OUT;SFP:1101; X-MS-Exchange-AntiSpam-MessageData-ChunkCount: 1 X-MS-Exchange-AntiSpam-MessageData-0: P04x3QLP+1zFZdEgozQoounLRwK/4qgKAdS3+T/1kmWD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TTxF8OFz53Nyf3FrU5mUv2rNTaBG1ttUjcplp0btcvb7ALlwFufonkf0JYjPnLiNp6Gs6EHwUi7kvW1PrsbWdYiwhe+bKsBw5K4f4iynd+JHfy9JdrORGX+sfY= X-OriginatorOrg: oracle.com X-MS-Exchange-CrossTenant-Network-Message-Id: 59857892-9d1c-42cb-0886-08dc5a47265b X-MS-Exchange-CrossTenant-AuthSource: CH0PR10MB5113.namprd10.prod.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Internal X-MS-Exchange-CrossTenant-OriginalArrivalTime: 11 Apr 2024 16:48:01.7720 (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: QNq/IPiGcHW34CtlhoEjBY0L/wBgipMsabBGgId1IgY8gE0xYf5zMLPI8IRL7N5YunJ2i8oPBigSnlt9IV6kQe8hK1CB7QAep+/gJVPaXCI= X-MS-Exchange-Transport-CrossTenantHeadersStamped: CY8PR10MB6827 X-Proofpoint-Virus-Version: vendor=baseguard engine=ICAP:2.0.272,Aquarius:18.0.1011,Hydra:6.0.619,FMLib:17.11.176.26 definitions=2024-04-11_09,2024-04-09_01,2023-05-22_02 X-Proofpoint-Spam-Details: rule=notspam policy=default score=0 mlxlogscore=974 malwarescore=0 suspectscore=0 spamscore=0 mlxscore=0 bulkscore=0 adultscore=0 phishscore=0 classifier=spam adjust=0 reason=mlx scancount=1 engine=8.12.0-2404010000 definitions=main-2404110122 X-Proofpoint-GUID: 54AU2YM8KA7ayH64Unh4fpYlW0RcSmIs X-Proofpoint-ORIG-GUID: 54AU2YM8KA7ayH64Unh4fpYlW0RcSmIs X-Rspamd-Queue-Id: CEE1A16000B X-Rspam-User: X-Stat-Signature: nx5owskmbienoafg9hxb9focmcg4zssm X-Rspamd-Server: rspam01 X-HE-Tag: 1712854109-556803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OT76Qzd8suJWVU8L9LCegBmwUFQXcHNYbcKg2wKbA6mwuLASuXbYHJyI5o9011fs2LJyWS2LPlynUZVb/Ago7PJ2gO7zL849fjc2MzXAIxjA6ys4rw2p4Ccc5DjmVvaB1Cmc/4R8uXWhNLcp3QI0eQJkzzn+N/gmyDZgHFvgLX+3mOwdORiB8K8ufLr6PrllNJx+rxMQR7LNxV3IV2AQettVvnrey9Ei/yiU6rzCiOJoPbNWQIKoXymBSDQQFR1u1xAmnJssliluTr73uwn7/dcd8TV4tpn9N+tY0fle8G6mgrp4ENMJB6YIB/spaP9LakASodEziqPBz5BNphQmhLwn0fR4R6z6u+/BU2gFckaqEhj9glYCUxVqDpdIJ3v4DxiPu29+6tti/4F3pqLUvgyEusgL1SYulA44f84nmRx6gaQNy4ZVwzz/fayvc3rU29xp87ZI/nxWkmBEGOBRhWo 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: Allows us to rename dissolve_free_huge_pages() to dissolve_free_hugetlb_folio(). Convert one caller to pass in a folio directly and use page_folio() to convert the caller in mm/memory-failure. Signed-off-by: Sidhartha Kumar Reviewed-by: Oscar Salvador --- include/linux/hugetlb.h | 4 ++-- mm/hugetlb.c | 15 +++++++-------- mm/memory-failure.c | 4 ++-- 3 files changed, 11 insertions(+), 12 deletions(-) diff --git a/include/linux/hugetlb.h b/include/linux/hugetlb.h index 3f3e628802792..f4191b10345d6 100644 --- a/include/linux/hugetlb.h +++ b/include/linux/hugetlb.h @@ -861,7 +861,7 @@ static inline int hstate_index(struct hstate *h) return h - hstates; } -extern int dissolve_free_huge_page(struct page *page); +extern int dissolve_free_hugetlb_folio(struct folio *folio); extern int dissolve_free_huge_pages(unsigned long start_pfn, unsigned long end_pfn); @@ -1148,7 +1148,7 @@ static inline int hstate_index(struct hstate *h) return 0; } -static inline int dissolve_free_huge_page(struct page *page) +static inline int dissolve_free_hugetlb_folio(struct folio *folio) { return 0; } diff --git a/mm/hugetlb.c b/mm/hugetlb.c index 454900c84b303..617f8bec6eb42 100644 --- a/mm/hugetlb.c +++ b/mm/hugetlb.c @@ -2377,8 +2377,8 @@ static struct folio *remove_pool_hugetlb_folio(struct hstate *h, } /* - * Dissolve a given free hugepage into free buddy pages. This function does - * nothing for in-use hugepages and non-hugepages. + * Dissolve a given free hugetlb folio into free buddy pages. This function + * does nothing for in-use hugepages and non-hugepages. * This function returns values like below: * * -ENOMEM: failed to allocate vmemmap pages to free the freed hugepages @@ -2390,10 +2390,9 @@ static struct folio *remove_pool_hugetlb_folio(struct hstate *h, * 0: successfully dissolved free hugepages or the page is not a * hugepage (considered as already dissolved) */ -int dissolve_free_huge_page(struct page *page) +int dissolve_free_hugetlb_folio(struct folio *folio) { int rc = -EBUSY; - struct folio *folio = page_folio(page); retry: /* Not to disrupt normal path by vainly holding hugetlb_lock */ @@ -2470,13 +2469,13 @@ int dissolve_free_huge_page(struct page *page) * make specified memory blocks removable from the system. * Note that this will dissolve a free gigantic hugepage completely, if any * part of it lies within the given range. - * Also note that if dissolve_free_huge_page() returns with an error, all + * Also note that if dissolve_free_hugetlb_folio() returns with an error, all * free hugepages that were dissolved before that error are lost. */ int dissolve_free_huge_pages(unsigned long start_pfn, unsigned long end_pfn) { unsigned long pfn; - struct page *page; + struct folio *folio; int rc = 0; unsigned int order; struct hstate *h; @@ -2489,8 +2488,8 @@ int dissolve_free_huge_pages(unsigned long start_pfn, unsigned long end_pfn) order = min(order, huge_page_order(h)); for (pfn = start_pfn; pfn < end_pfn; pfn += 1 << order) { - page = pfn_to_page(pfn); - rc = dissolve_free_huge_page(page); + folio = pfn_folio(pfn); + rc = dissolve_free_hugetlb_folio(folio); if (rc) break; } diff --git a/mm/memory-failure.c b/mm/memory-failure.c index 88359a185c5f9..5a6062b61c44d 100644 --- a/mm/memory-failure.c +++ b/mm/memory-failure.c @@ -155,11 +155,11 @@ static int __page_handle_poison(struct page *page) /* * zone_pcp_disable() can't be used here. It will hold pcp_batch_high_lock and - * dissolve_free_huge_page() might hold cpu_hotplug_lock via static_key_slow_dec() + * dissolve_free_hugetlb_folio() might hold cpu_hotplug_lock via static_key_slow_dec() * when hugetlb vmemmap optimization is enabled. This will break current lock * dependency chain and leads to deadlock. */ - ret = dissolve_free_huge_page(page); + ret = dissolve_free_hugetlb_folio(page_folio(page)); if (!ret) { drain_all_pages(page_zone(page)); ret = take_page_off_buddy(page);