From patchwork Fri Apr 12 18:21:38 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Sidhartha Kumar X-Patchwork-Id: 13628230 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 0C777C04FF8 for ; Fri, 12 Apr 2024 18:22:16 +0000 (UTC) Received: by kanga.kvack.org (Postfix) id 6362E6B0087; Fri, 12 Apr 2024 14:22:16 -0400 (EDT) Received: by kanga.kvack.org (Postfix, from userid 40) id 5BDFA6B0093; Fri, 12 Apr 2024 14:22:16 -0400 (EDT) X-Delivered-To: int-list-linux-mm@kvack.org Received: by kanga.kvack.org (Postfix, from userid 63042) id 3C24F6B0095; Fri, 12 Apr 2024 14:22:16 -0400 (EDT) X-Delivered-To: linux-mm@kvack.org Received: from relay.hostedemail.com (smtprelay0015.hostedemail.com [216.40.44.15]) by kanga.kvack.org (Postfix) with ESMTP id 1A7626B0087 for ; Fri, 12 Apr 2024 14:22:16 -0400 (EDT) Received: from smtpin20.hostedemail.com (a10.router.float.18 [10.200.18.1]) by unirelay07.hostedemail.com (Postfix) with ESMTP id C0CB8160FAB for ; Fri, 12 Apr 2024 18:22:15 +0000 (UTC) X-FDA: 82001699430.20.6A8CD6B Received: from mx0a-00069f02.pphosted.com (mx0a-00069f02.pphosted.com [205.220.165.32]) by imf24.hostedemail.com (Postfix) with ESMTP id 71222180004 for ; Fri, 12 Apr 2024 18:22:11 +0000 (UTC) Authentication-Results: imf24.hostedemail.com; dkim=pass header.d=oracle.com header.s=corp-2023-11-20 header.b="jUKST0/k"; dkim=pass header.d=oracle.onmicrosoft.com header.s=selector2-oracle-onmicrosoft-com header.b=UHIHk3wM; arc=pass ("microsoft.com:s=arcselector9901:i=1"); dmarc=pass (policy=quarantine) header.from=oracle.com; spf=pass (imf24.hostedemail.com: domain of sidhartha.kumar@oracle.com designates 205.220.165.32 as permitted sender) smtp.mailfrom=sidhartha.kumar@oracle.com ARC-Seal: i=2; s=arc-20220608; d=hostedemail.com; t=1712946131; a=rsa-sha256; cv=pass; b=cGEdqykhgDNCu0w61YJ9mlpU3ZBp10Usjf234UE8NXH0wgDyvWlhqDd1273KQP2O7jIWdZ fu0C4DGAbEMzBgaQL0gfUky5bjNjTFgSyNXFci99U2xo6SHN4YQZ9As7tnQaqidQuQXyRY N9Eq/QPKxEb0D52h/tdF5FWykulD8Vs= ARC-Authentication-Results: i=2; imf24.hostedemail.com; dkim=pass header.d=oracle.com header.s=corp-2023-11-20 header.b="jUKST0/k"; dkim=pass header.d=oracle.onmicrosoft.com header.s=selector2-oracle-onmicrosoft-com header.b=UHIHk3wM; arc=pass ("microsoft.com:s=arcselector9901:i=1"); dmarc=pass (policy=quarantine) header.from=oracle.com; spf=pass (imf24.hostedemail.com: domain of sidhartha.kumar@oracle.com designates 205.220.165.32 as permitted sender) smtp.mailfrom=sidhartha.kumar@oracle.com ARC-Message-Signature: i=2; a=rsa-sha256; c=relaxed/relaxed; d=hostedemail.com; s=arc-20220608; t=1712946131; 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=vA4YLOAyQ9xtjctU+acsQ0fDCbQX0dFxfmWmHAYHdf4=; b=020nyMQN+yUm9feAMEa3+V0irwfZtEs2YXVKuABvd8IDalSyoNyBxWc7wDGnzq0FbsnWb9 W+lj3kbyCBuostEbzKK5NHZxEJCHBqUnuXe7QdEgD/YWUEHK2CiV34hhyVocRyYxKIVtBJ xTBU185dHfhz2gC/k8IQQgKY+r0+fpY= 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 43CI9hZL026998; Fri, 12 Apr 2024 18:21:51 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=vA4YLOAyQ9xtjctU+acsQ0fDCbQX0dFxfmWmHAYHdf4=; b=jUKST0/krdyneCqrGpXRwvmK8KPvshjFheYeNhK40nBxhSkT1s6/UO1HTDytaDyJd8Iv vFPaZDysglkQNtKoswzKfchVVt/3kLKJD8730DCHmzRXsAyqeWVS5N6BzcjSWg7UGifd brcsCYGVMbszR48W2o8KVwML9NClrgkmkAkx7cJ89G4L0Xpc4JMAffXmBhs0nb6TadRy gwmgo3CacNDqZibpFFyAQm5yvduVF/dQycwl6wc2+Qrascdf7C/3LRO+n7G3/l0p0+Rx E/gA7jN1SsAwrwYQ9fFCy0h8xhWD8+gjiwh8HR7iZq0ZwfA4/b6f0LSa0p/wINUwMzxZ PQ== Received: from phxpaimrmta01.imrmtpd1.prodappphxaev1.oraclevcn.com (phxpaimrmta01.appoci.oracle.com [138.1.114.2]) by mx0b-00069f02.pphosted.com (PPS) with ESMTPS id 3xaw02ckmr-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=OK); Fri, 12 Apr 2024 18:21:50 +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 43CHoaFl008048; Fri, 12 Apr 2024 18:21:50 GMT Received: from nam02-bn1-obe.outbound.protection.outlook.com (mail-bn1nam02lp2041.outbound.protection.outlook.com [104.47.51.41]) by phxpaimrmta01.imrmtpd1.prodappphxaev1.oraclevcn.com (PPS) with ESMTPS id 3xavubb4nm-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=OK); Fri, 12 Apr 2024 18:21:50 +0000 ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=G5RL9oniyVG/cTeakegf7x3/Dc0K9W138K0R9sQAYUwO3pe4BiomkZQC1YONRUt3vf9HQkFuLZhZMuGuriFGHeZuweDm/kFNQ2/Wqu/le127dn1++D/DfQcHjmtuk/i6AI1tbV0Dvt0cHbFsTOqa3VfrprPPD1xb1xR/lfUVqbRqum+rQPpDVwa0ebFt9mvjl2M6+15GRH6v69cM5Q5/Ij6OHp9Ru8Hm8iKnwR2bEvk4cgknAPZbHB4+7o4TFU9Ab76wq4C1l4l6IqHLIHksBHwrlsnCf4M5NjPM5d2XcN5Fxuc5ESk/JVtN6wmOE2P/h9T3qRX1prvZL93tFl50+g== 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=vA4YLOAyQ9xtjctU+acsQ0fDCbQX0dFxfmWmHAYHdf4=; b=PuIC2GOGDp04Ap1zGMVL8AdMhisLrQZdI+p1paXan2V1qhkXI5ZF8Q8SRFVYTLMB0aeiROaK5VvZCEo+s+3rZ29oKTxmwBX/hYRuN8w1duRkFVkuR8IuWkykjV10veILMtGxdYIDMDv9OGVYrh2Owsd6nr3asqU/iqXP1gaYRdrMS+Zksqk/1qGQDX0Zpj59pIUp1JPk4EL6biZx0EbxeaqPYfR3k8vM6z20d33XqJwY+BfKtRyQ9Zqgli6s9CZAuSjeyIibhJ7tJLPPMP7LiNeeowfvDEVeGN+c9KPtku/93posYtXgYCsPKs6vDdZNe0sHdyaa9csIfFMRl1muiw== 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=vA4YLOAyQ9xtjctU+acsQ0fDCbQX0dFxfmWmHAYHdf4=; b=UHIHk3wMzBDMzVsvA+NjV7M8MrjerinmsLMhSO9Afwe0vH9c8P78paFpGr3Z+39ags2s05q841ciBqvUhOTKIb+QUnmeD0XXUsLQR0Jy69gdnNxbsFLrbG553UV0xU8/Y165cG8fFVIpEcEOVPgtSnbETEPVpKoRskWN7opKPb0= Received: from CH0PR10MB5113.namprd10.prod.outlook.com (2603:10b6:610:c9::8) by CO1PR10MB4785.namprd10.prod.outlook.com (2603:10b6:303:95::11) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.7409.55; Fri, 12 Apr 2024 18:21:47 +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; Fri, 12 Apr 2024 18:21:47 +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, osalvador@suse.de, Sidhartha Kumar Subject: [PATCH v2 1/2] mm/hugetlb: convert dissolve_free_huge_pages() to folios Date: Fri, 12 Apr 2024 11:21:38 -0700 Message-ID: <20240412182139.120871-1-sidhartha.kumar@oracle.com> X-Mailer: git-send-email 2.44.0 X-ClientProxiedBy: MW4PR03CA0184.namprd03.prod.outlook.com (2603:10b6:303:b8::9) To CH0PR10MB5113.namprd10.prod.outlook.com (2603:10b6:610:c9::8) MIME-Version: 1.0 X-MS-PublicTrafficType: Email X-MS-TrafficTypeDiagnostic: CH0PR10MB5113:EE_|CO1PR10MB4785:EE_ X-MS-Office365-Filtering-Correlation-Id: c2c79d0d-aafe-4bd0-6602-08dc5b1d6a32 X-MS-Exchange-SenderADCheck: 1 X-MS-Exchange-AntiSpam-Relay: 0 X-Microsoft-Antispam: BCL:0; X-Microsoft-Antispam-Message-Info: H+CeL5NOvTTx1hMbacFJiHwpjJbJkgUImRRnjB86Q7UHEq6k1/znTpUql0Mrgbi+yBSxScxPicKpsopNpvRfjhOcv50X7U3zyIVTy5LZZgyZ9GOp43jp1/+QY+aMX6Kk+VWmTlhcAgwVUoFzmwZzsjYCRurhNKeHBzOa8xP7XrEgOrR0SgfkVG1yafgvRgXRL/B3C9mu+GbyXU8NDEuYEvZPcYKNcqKBEwckg1z83T2+WVGkE6RhItkq4aTAy8RgZnUI3eo0C0dYLJTL9fbztD8YtjlvM/Ti8b7L94+lXbPxGZ15ktOCk0h8H3swiSoD7L9EQTiZ+V9pJgygAzzJBqzQz4Qy6fptgYfwETuDeNmYNeQMSoyaReOXKTIjdtZv7fIJ2E1LuH1nfpqCNwg6dO7POWz7v+yJhDL51iA6j3P0NLWirg7Jdckxyx3UGT2NZv2ja7NUHBB/fmrab+e0S5lpsuld77plex5qOJ7owG1maZGdHOg1exjLBTPubiHjN0BIBwxVGepf0AyMPdg5rNmX59ieMoL7MCsIkPZO4tlQCZx6BUskFt8A+d6rj3tATkDSRARpK7Vri6KmJG5oUCb/eZ+3Z1qWVR2MHXM1SCMVb3el/P9UYuHNHWlzfLpbccMns8RSetHq3PLJugw/Qj7UTXTu8Ndr+wtkU3NUhlw= 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: PxzAdf7CW5193iZvN6vfeN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LEsVBjqpwK22wp/RGFM4l8r3OLvRvPNmujw0CeIUhwPU6CuRbecuBqQ0kaCAjxiA6d4R9nhrAvCq8QP1JDeXYK8/pOWIw/34JjYM/eOu1Dc+cA2Z3xZx6COnRWRSvtSCJCKfj4Uz/vT+ZJfY= X-OriginatorOrg: oracle.com X-MS-Exchange-CrossTenant-Network-Message-Id: c2c79d0d-aafe-4bd0-6602-08dc5b1d6a32 X-MS-Exchange-CrossTenant-AuthSource: CH0PR10MB5113.namprd10.prod.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Internal X-MS-Exchange-CrossTenant-OriginalArrivalTime: 12 Apr 2024 18:21:47.6504 (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: 2CiacuYTcFimOE0p1deNnK4IHXCjIpq641IoDkNXn8w6kPPfOrUHipaK2pna+eLmUJIIx7NJxjY8Uq3wnK781xVrCXJ/Ke0pvH7wYHkpvZ8= X-MS-Exchange-Transport-CrossTenantHeadersStamped: CO1PR10MB4785 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-12_14,2024-04-09_01,2023-05-22_02 X-Proofpoint-Spam-Details: rule=notspam policy=default score=0 mlxlogscore=999 suspectscore=0 mlxscore=0 adultscore=0 phishscore=0 bulkscore=0 spamscore=0 malwarescore=0 classifier=spam adjust=0 reason=mlx scancount=1 engine=8.12.0-2404010000 definitions=main-2404120135 X-Proofpoint-ORIG-GUID: K643jE3cifWuy7VSwqMOYResIwd-7T42 X-Proofpoint-GUID: K643jE3cifWuy7VSwqMOYResIwd-7T42 X-Rspam-User: X-Rspamd-Server: rspam06 X-Rspamd-Queue-Id: 71222180004 X-Stat-Signature: ccpzsfwcroie94yxna1w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lFU1PH8U6tT2dUEWdEDMSXlDMYi3k2SMGz3EWYgAF+2HpM2uNXgCSgL1SCGidih71tzVRwfxLhiwz0jUKUeUPOxUYbsgpUJrAV+Ewp63A9LV7aoc/vJ3XKf4mfIwBXEPKM+us4XtVqQ+DjVyWa9qWHbfgXy6ohzc+u94ePH1QQ+MQaSkRBGNyPM8xLu7LC7BsBpWzHb56Y6oHbMXFjszaB/tqiBU+sekvWoJR1CUJ+nIWiHSM28JLwN8G/yUU6dWSNkNgndL1n3CwqWU6NippyPimXzZEnlQA51Hz5oeQuH9UDHd8fPY5X4mJOSUDrr7vB0VW9ZR803wHtd8O5+5D8gVYIIDTYIXHLbAAj5yAHwhKSaq3AmgeLPV8uZJBryaXgWtZ0qaTjSwPVLBe08uLSXDfxlqgzeBw3Nl+9XnX2VnK/aqvU6oKiqiqNIyTrg2MfwETFY0g8hSisBISjRhfVV+vzOLG2vXq/ST8KLKTD3lBPmQAr/i 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 Reviewed-by: Vishal Moola (Oracle) Reviewed-by: Miaohe Lin --- v1 -> v2: - Change additional comments which reference hugepages to hugetlb folios per Miaohe Lin. - introduce patch 2 include/linux/hugetlb.h | 4 ++-- mm/hugetlb.c | 17 ++++++++--------- mm/memory-failure.c | 8 ++++---- 3 files changed, 14 insertions(+), 15 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..f6dd5f597df16 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 hugetlb folios and non-hugetlb folios. * 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 - * free hugepages that were dissolved before that error are lost. + * Also note that if dissolve_free_hugetlb_folio() returns with an error, all + * free hugetlb folios 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..8cc91aa1a3f47 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); @@ -172,8 +172,8 @@ static bool page_handle_poison(struct page *page, bool hugepage_or_freepage, boo { if (hugepage_or_freepage) { /* - * Doing this check for free pages is also fine since dissolve_free_huge_page - * returns 0 for non-hugetlb pages as well. + * Doing this check for free pages is also fine since + * dissolve_free_hugetlb_folio() returns 0 for non-hugetlb folios as well. */ if (__page_handle_poison(page) <= 0) /*