From patchwork Wed Jul 19 17:59:44 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Sidhartha Kumar X-Patchwork-Id: 13319311 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 77838C0015E for ; Wed, 19 Jul 2023 18:00:25 +0000 (UTC) Received: by kanga.kvack.org (Postfix) id C875128007D; Wed, 19 Jul 2023 14:00:24 -0400 (EDT) Received: by kanga.kvack.org (Postfix, from userid 40) id C363D28004C; Wed, 19 Jul 2023 14:00:24 -0400 (EDT) X-Delivered-To: int-list-linux-mm@kvack.org Received: by kanga.kvack.org (Postfix, from userid 63042) id A892B28007D; Wed, 19 Jul 2023 14:00:24 -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 97C2328004C for ; Wed, 19 Jul 2023 14:00:24 -0400 (EDT) Received: from smtpin06.hostedemail.com (a10.router.float.18 [10.200.18.1]) by unirelay01.hostedemail.com (Postfix) with ESMTP id DF8191C7BE7 for ; Wed, 19 Jul 2023 18:00:23 +0000 (UTC) X-FDA: 81029125926.06.143CF7A Received: from mx0a-00069f02.pphosted.com (mx0a-00069f02.pphosted.com [205.220.165.32]) by imf01.hostedemail.com (Postfix) with ESMTP id A59944004C for ; Wed, 19 Jul 2023 18:00:15 +0000 (UTC) Authentication-Results: imf01.hostedemail.com; dkim=pass header.d=oracle.com header.s=corp-2023-03-30 header.b=oJEezSh+; dkim=pass header.d=oracle.onmicrosoft.com header.s=selector2-oracle-onmicrosoft-com header.b=LbCEMeEB; spf=pass (imf01.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=none) header.from=oracle.com; arc=pass ("microsoft.com:s=arcselector9901:i=1") ARC-Message-Signature: i=2; a=rsa-sha256; c=relaxed/relaxed; d=hostedemail.com; s=arc-20220608; t=1689789615; 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=YtDp3sgfoAD1bDqnXsk/05Amf2WqHZORgkvlNwXd8Ck=; b=VNMwNqHavGl5gCOoa1i2dTRyjdBPsXgywOj68lP71esJQ+mJh8dHzlhh2IBOdhTHRxsiRd Zx4zt4vbch816sNq9mE7DgPeAbRisAJ9FzM+K8DJI/1og1E5+fdpZs8Dw2zeqyNEYBLx1b MFXVyLFMd1T26pD71ywqSjiCJupvUUU= ARC-Seal: i=2; s=arc-20220608; d=hostedemail.com; t=1689789615; a=rsa-sha256; cv=pass; b=IL27JBauDOBvRvARmwaGfhiJAEHgPz6Ir6xtsQIclP/ztvB6Yusf83a8e1rXNC03RAIxlR o9NyHfO2Q0w0HXdlshxzQfFTGgphdzOH5P2Bac5iPmw3HKOtHk4XkyAIoVnOiJOa99aGMu zOxg8sYJT/aSeJE8MEu5weUB8KZxVH8= ARC-Authentication-Results: i=2; imf01.hostedemail.com; dkim=pass header.d=oracle.com header.s=corp-2023-03-30 header.b=oJEezSh+; dkim=pass header.d=oracle.onmicrosoft.com header.s=selector2-oracle-onmicrosoft-com header.b=LbCEMeEB; spf=pass (imf01.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=none) header.from=oracle.com; arc=pass ("microsoft.com:s=arcselector9901:i=1") 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 36JFOhmX022370; Wed, 19 Jul 2023 17:59:55 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-03-30; bh=YtDp3sgfoAD1bDqnXsk/05Amf2WqHZORgkvlNwXd8Ck=; b=oJEezSh+RQorvRn1eQjk2/c2xblRXBaX4srM+qzSK3hmmBfRT3cL7JbhgKptnlr2kV9o m6sUmS00d1q7tpSRdNPNf03QO5vUoySr3Eul5kp8iMtS6YQuP2vLcd7G6QBrqFwTVlrj 1epHGiTbu4ztJBAZ5pdnHzTm27IEBNgcDdD58HU3zOUsxkQ3wxlijdtXLdJxOkI6AUND woi+5aFzBEXch4wCwzburNhJdzYgC3r/LKdCixC06KF31/nb2AKAXDa3bX7aXffvVisS b+FMw4KYg4WfPo6dqcuRC2hMawIqNN8e9EzE4wwu4j8S9tqZQXociNeC1s0lnjJerUbS 5A== Received: from phxpaimrmta01.imrmtpd1.prodappphxaev1.oraclevcn.com (phxpaimrmta01.appoci.oracle.com [138.1.114.2]) by mx0b-00069f02.pphosted.com (PPS) with ESMTPS id 3run8a85hb-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=OK); Wed, 19 Jul 2023 17:59:54 +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 36JGHcNC038179; Wed, 19 Jul 2023 17:59:54 GMT Received: from nam12-bn8-obe.outbound.protection.outlook.com (mail-bn8nam12lp2168.outbound.protection.outlook.com [104.47.55.168]) by phxpaimrmta01.imrmtpd1.prodappphxaev1.oraclevcn.com (PPS) with ESMTPS id 3ruhw77w25-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=OK); Wed, 19 Jul 2023 17:59:54 +0000 ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=I4iu66p3LY4lMPNOqxrvvLIORctsEOJbE7MA0+vQmvdSSyKu6aqMBxAzeAYHPssgL4iVDzF0g5ThCNcLfu49HNe6vc557oh25LFgoVKkvB71xz6aDEeLoualrUuLnoZbqmSbA2xYMzbZW1wAoASXQx9ijTtUJSUzUiHD18Nx1AZVX0fpmY3FwHZV4U2mAkzpJfJ6vKA/cBUgfNtKJPkYWPvulxCjAoHiFQJUDyNeDcHdf2zv9SVtvGmd0F+5QAZjr1h8PwsaGBn6uScQntxJ2tadvCd/4HQ1Dk7n6YPOUS93CBTPb/6Ut2YeXLJNMLvLwVAdUlabLHAMdNOi7a0FsA== 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=YtDp3sgfoAD1bDqnXsk/05Amf2WqHZORgkvlNwXd8Ck=; b=dpr7zBn4gmcfIUP5N+VnSI/qF+HbzGZXYNcVY7jVeLbnAD9Tlr/6Znp3ufmb5so3Fu6IQB/4MIXDqKiZsgLJImKGkw5e0fo6exg+ti9SzdZ6kmfZzQcl00A+bijyEC35TD9fyCJ+fspsbvmw9a3p2LIRxG9tlmnX6fEkUnJgL4Rzo0+wR8MrKxXLTcUL9PtldIry4PD+DDVWhukiZL3eL/F7+HCidZo4I12njDkSMZmXRVKrXRDqXQzLL/59V8dyuP2FKJ0XGXrFhOj4zKEDi6bWyJ1rmzejI+Wx82GBOLNoWtWwNRjrYE6aMybVum2bZARXOadlaX0RzTthuGCQ4w== 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=YtDp3sgfoAD1bDqnXsk/05Amf2WqHZORgkvlNwXd8Ck=; b=LbCEMeEBDQbkBUHFl7tcf0ggNHjc21g/l0IRX1r2E3aMfstQawgq1lvBapxLqobCmGjKcJqJNBDtC+AyYhkicl126IxJLaZKZ4XgEvn2Hm8A5WRYAwTqrvrTAv8/kh0t1dLEGoqzhXKCu+n2YTLnxjCn+7I3VmmOz9bqk+DQXnM= Received: from CH0PR10MB5113.namprd10.prod.outlook.com (2603:10b6:610:c9::8) by PH7PR10MB6355.namprd10.prod.outlook.com (2603:10b6:510:1b6::12) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.6609.23; Wed, 19 Jul 2023 17:59:51 +0000 Received: from CH0PR10MB5113.namprd10.prod.outlook.com ([fe80::6bff:7715:4210:1e52]) by CH0PR10MB5113.namprd10.prod.outlook.com ([fe80::6bff:7715:4210:1e52%7]) with mapi id 15.20.6609.024; Wed, 19 Jul 2023 17:59:49 +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, Sidhartha Kumar Subject: [PATCH] mm/hugetlb: get rid of page_hstate() Date: Wed, 19 Jul 2023 10:59:44 -0700 Message-ID: <20230719175944.292929-1-sidhartha.kumar@oracle.com> X-Mailer: git-send-email 2.41.0 X-ClientProxiedBy: SJ0PR05CA0160.namprd05.prod.outlook.com (2603:10b6:a03:339::15) To CH0PR10MB5113.namprd10.prod.outlook.com (2603:10b6:610:c9::8) MIME-Version: 1.0 X-MS-PublicTrafficType: Email X-MS-TrafficTypeDiagnostic: CH0PR10MB5113:EE_|PH7PR10MB6355:EE_ X-MS-Office365-Filtering-Correlation-Id: e87fd482-2a23-4d21-df6f-08db8881f206 X-MS-Exchange-SenderADCheck: 1 X-MS-Exchange-AntiSpam-Relay: 0 X-Microsoft-Antispam: BCL:0; X-Microsoft-Antispam-Message-Info: PukNL/LjMRadOBajsk4KuUbvdJJdaA2q1I1KiT+bSd7qWSX/FpRfbAcG+vncsrYTXyPwuUPGw+JkfWPN3WsEUJh6ehOC9l9GsshNkI4MPy+vhYRyK/R6iXsaP9XZSK/UUR0rf5Pl1plHb6Q0slaJe5zm2/WDNceUmjiiNzfCq6jNvSkOQ9/PI5vltDdhVj9CShKYBjAXBV4X54BmCI2XNoqo9g9ttM0vaYSo8EICKik5sPKFEga8iWlJpxm3XWgyFocdSIhqdndw70d1fEymvVwMSWjMFo4sJpI9w76qhv+R/NlsXAs0vYN7qBtlqETgw3Mt5KW0PxzhStMecbWDK8tEq5rO1GSzwXELt0efkkeu+owQYngT/8MXLfaEZsrj8NiyruEeuFTQTMjqzRjJMwZoZrjo8wtQdnL1HiM66a7j2BKaT2ojt52xMuS8swn/lkc5wmNIq+Klqbe7bO965NIjCmmaQvi3V6R2sNDPGFszrzdTwpFYVW2d3i7+IPtLBiPYDWTtiyxV6UajON64u+QMTBKs9XvkCgWdtlqQG3vHxFi5bdRjt9pctpucxP9bytxRnX8Kyj7g1TQwBXMqraZUMmXsGsE+kaNy4kNH6EU= 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:(13230028)(366004)(396003)(376002)(39860400002)(346002)(136003)(451199021)(2906002)(6506007)(1076003)(6512007)(107886003)(316002)(5660300002)(4326008)(66476007)(8936002)(66556008)(8676002)(41300700001)(44832011)(66946007)(36756003)(38100700002)(6666004)(6486002)(478600001)(83380400001)(2616005)(86362001)(186003)(26583001);DIR:OUT;SFP:1101; X-MS-Exchange-AntiSpam-MessageData-ChunkCount: 1 X-MS-Exchange-AntiSpam-MessageData-0: QQAAm7q2rXQAlg/dVstN2DuTl2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bvigbvw44+bMSVbwDlyUmD2n5uPMtbpAvsJXOw+UsA4Nj+62TD7m6+rnKv69MIc6nG1iCYeB2haNF12qWNkZMneCpxrOspFdHzQFzoGoFtIQgwvHw7VNgla4Sq169xrzthLCGjhpddWbjjDeiTWKGLUV1IE9+M1nngfSMsoB55326FqVt4WIyldgT4h0tLkGrX8cyuaouNryOJlYk5bLCNNkEKexkUsaTRrtmWiwNOCtpqKbkr+gqpaIZsI3Hp3a7/of411q36IJmp41T6IvmTxCgdYzi/Lfzuy9cGLQucUx/zhkzxKYKiZHbFzFtyMijHWQCJ9hceCQCMW3wC3ajymMc6g81m/XYZ8QsWTyOSKJJqB54R16xYLtPtta3YMxAmpyhVQr+QtolPoW+xd2iaYMWVfPKeVhoekEh6 X-OriginatorOrg: oracle.com X-MS-Exchange-CrossTenant-Network-Message-Id: e87fd482-2a23-4d21-df6f-08db8881f206 X-MS-Exchange-CrossTenant-AuthSource: CH0PR10MB5113.namprd10.prod.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Internal X-MS-Exchange-CrossTenant-OriginalArrivalTime: 19 Jul 2023 17:59:49.7630 (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: YZBXwX5BsV3QwNtEpy8yXFSW1LqbdvRBtA0nZS+OrB+GBfJzIrj3rA0h7uWc6BYYVVxvP4X8C2B6yF0FH8donXb4ZQoP6vWuF3YTaY0lpHc= X-MS-Exchange-Transport-CrossTenantHeadersStamped: PH7PR10MB6355 X-Proofpoint-Virus-Version: vendor=baseguard engine=ICAP:2.0.254,Aquarius:18.0.957,Hydra:6.0.591,FMLib:17.11.176.26 definitions=2023-07-19_12,2023-07-19_01,2023-05-22_02 X-Proofpoint-Spam-Details: rule=notspam policy=default score=0 suspectscore=0 mlxscore=0 phishscore=0 adultscore=0 spamscore=0 bulkscore=0 malwarescore=0 mlxlogscore=999 classifier=spam adjust=0 reason=mlx scancount=1 engine=8.12.0-2306200000 definitions=main-2307190162 X-Proofpoint-GUID: UQuWwiNeJ0JI2DDWUsRAglE3TOHzHkvZ X-Proofpoint-ORIG-GUID: UQuWwiNeJ0JI2DDWUsRAglE3TOHzHkvZ X-Rspamd-Queue-Id: A59944004C X-Rspam-User: X-Rspamd-Server: rspam11 X-Stat-Signature: t5uhsijhuqd6nus5irxs6qopa4digmxp X-HE-Tag: 1689789615-543911 X-HE-Meta: U2FsdGVkX18B+cHDyoztvXSQCLlCr2RNMWCvzWi9zCuLDylp6pPgt27b20bDPEavu+MBrgoS9dEDtljG3f6WKxEVTkinjwoiE2oYA8nnSv5Ca2X3vY4fqL1MZGrsHZrgzFxrmGTJrbPcUsMUvQwHFMi5sg39lKsGTeNOmq3MIXQwWvFOUzC8KRfYeeN8jmJidfPPzv1qi2FeC+4JE/jSdIVe1OBpZ83kmHOEQRjrw+AKDdxCJXuv+hPf8IMYXVii0x34aq8CprLpLUaLoqagbienXvrbfqwHe+VqTBmXQDOYeFsqv+IES8TrrLe3YdtcC1RQdxKeYc0f5WD8gSW4Y5nbsbIe0Tvx03GFUAU0PvUBwKBXUH7SrwMDfC8dZSqeokOF+WtaeGgEcK6XWutjW7Aq18zF5EXp+Jq2dKQQfK8L+XVfHCxeJl8fXfO3rQvo73zYLTfrlnp2159uxv++94QtafaXKE7ocbrxfV05VxyRSfkqUyEiWjHMv8ttpxQu8KbFwTsHp18iag0CSFuOl2N+WuYwc4hgOdEaNgHO1FmJkru7YjM5GSVX1wRTHiEA8NWiy5DJO4l8koWguD9DhcTyBJrSZB+RH6k1ONTBnpFfdqrPxCIHM9nIFM+hKlhFTqsPTyoW2O3ZK4ZkAFSSesrJTuKpMjECP3OANe4PAQKZjtOpmTnTJaHyujjMY4M3U/l7Uj1a5u2bKDToY1i54e11P9guYbor8u+9gieYY11HBFT9JBGQmO+754ObjOk/hydy/j+i1QC9z22g+TUhTOj0+43PuDvj8CxsYufYh5wsZWxIoXJsiYf+OMRo0fomE5aq00UCF+qNq+5mWvvJ5IVKylI7Lk0eU/p1nc35VBwo1r8Zw+PxW5YdNU7ZZ7rn2cHSezk/zo4j5RstJfRLV3XMj2MhlxtVPrnK+xj11kz/Hv+vVL0AvtvjSXQD3fLBamsgrd9kC/zHMRpirCS vEhTbRKf tUhJSPQyFZFgORtAN44gL42LkvSZ9KyxZxx5xsjXI73our8NnpPDEB7n+fNJruK5H07LQkJ3618bYXS4MKo3iw+a7VjOYbRMjPSKJSiHFjOhWuWneE+3Kr3o5dEJtZKX3lOGeUgao9IDB8mBtPaZxCngDPZiBwjGvkjWlkqwhPDgawLRXPKLdjTe4bKexR0Tdhz7ZepKCd+GCwKt4XsqeyvxWSMVTrCjCcBYWsHAmZU61LyZeMNph0tYb8Pj0bL6z7PgWgmgqE7b1L/n/R4DnUPTp6uQ7LdyEUaHDGvDuc+67ifCT/Hp4+ZwV8KdXAxZTdT83GExHdUVEAovYfKjqYo/1TWXEIv3WeXQzNNi0qYS53NO9FIODw14eSAubLCIsL8lleARL9VInKj+G1szPMtFTeiMBoRcSRBYNI0cNUD0tt9k= 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: Converts the last page_hstate() user to use folio_hstate() so page_hstate() can be safely removed. Signed-off-by: Sidhartha Kumar --- include/linux/hugetlb.h | 10 ---------- mm/hugetlb.c | 6 +++--- mm/page_isolation.c | 8 ++++---- 3 files changed, 7 insertions(+), 17 deletions(-) diff --git a/include/linux/hugetlb.h b/include/linux/hugetlb.h index 57f21279c529f..3d4de9c7326bb 100644 --- a/include/linux/hugetlb.h +++ b/include/linux/hugetlb.h @@ -847,11 +847,6 @@ static inline struct hstate *folio_hstate(struct folio *folio) return size_to_hstate(folio_size(folio)); } -static inline struct hstate *page_hstate(struct page *page) -{ - return folio_hstate(page_folio(page)); -} - static inline unsigned hstate_index_to_shift(unsigned index) { return hstates[index].order + PAGE_SHIFT; @@ -1088,11 +1083,6 @@ static inline struct hstate *folio_hstate(struct folio *folio) return NULL; } -static inline struct hstate *page_hstate(struct page *page) -{ - return NULL; -} - static inline struct hstate *size_to_hstate(unsigned long size) { return NULL; diff --git a/mm/hugetlb.c b/mm/hugetlb.c index 71d18bb76b4df..b15ae05819a8a 100644 --- a/mm/hugetlb.c +++ b/mm/hugetlb.c @@ -1785,10 +1785,10 @@ static void free_hpage_workfn(struct work_struct *work) node = node->next; page->mapping = NULL; /* - * The VM_BUG_ON_PAGE(!PageHuge(page), page) in page_hstate() - * is going to trigger because a previous call to + * The VM_BUG_ON_FOLIO(!folio_test_hugetlb(folio), folio) in + * folio_hstate() is going to trigger because a previous call to * remove_hugetlb_folio() will call folio_set_compound_dtor - * (folio, NULL_COMPOUND_DTOR), so do not use page_hstate() + * (folio, NULL_COMPOUND_DTOR), so do not use folio_hstate() * directly. */ h = size_to_hstate(page_size(page)); diff --git a/mm/page_isolation.c b/mm/page_isolation.c index 6599cc965e216..cd36b9998483d 100644 --- a/mm/page_isolation.c +++ b/mm/page_isolation.c @@ -79,17 +79,17 @@ static struct page *has_unmovable_pages(unsigned long start_pfn, unsigned long e * handle each tail page individually in migration. */ if (PageHuge(page) || PageTransCompound(page)) { - struct page *head = compound_head(page); + struct folio *folio = page_folio(page); unsigned int skip_pages; if (PageHuge(page)) { - if (!hugepage_migration_supported(page_hstate(head))) + if (!hugepage_migration_supported(folio_hstate(folio))) return page; - } else if (!PageLRU(head) && !__PageMovable(head)) { + } else if (!folio_test_lru(folio) && !__folio_test_movable(folio)) { return page; } - skip_pages = compound_nr(head) - (page - head); + skip_pages = folio_nr_pages(folio) - (page - &folio->page); pfn += skip_pages - 1; continue; }