Message ID | 20230125170537.96973-3-sidhartha.kumar@oracle.com (mailing list archive) |
---|---|
State | New |
Headers | show
Return-Path: <owner-linux-mm@kvack.org> 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 52591C54E94 for <linux-mm@archiver.kernel.org>; Wed, 25 Jan 2023 17:06:18 +0000 (UTC) Received: by kanga.kvack.org (Postfix) id E07056B007B; Wed, 25 Jan 2023 12:06:17 -0500 (EST) Received: by kanga.kvack.org (Postfix, from userid 40) id D904D6B007D; Wed, 25 Jan 2023 12:06:17 -0500 (EST) X-Delivered-To: int-list-linux-mm@kvack.org Received: by kanga.kvack.org (Postfix, from userid 63042) id BE2646B007E; Wed, 25 Jan 2023 12:06:17 -0500 (EST) X-Delivered-To: linux-mm@kvack.org Received: from relay.hostedemail.com (smtprelay0014.hostedemail.com [216.40.44.14]) by kanga.kvack.org (Postfix) with ESMTP id A357B6B007B for <linux-mm@kvack.org>; Wed, 25 Jan 2023 12:06:17 -0500 (EST) Received: from smtpin09.hostedemail.com (a10.router.float.18 [10.200.18.1]) by unirelay06.hostedemail.com (Postfix) with ESMTP id 6CF69AB3BC for <linux-mm@kvack.org>; Wed, 25 Jan 2023 17:06:17 +0000 (UTC) X-FDA: 80393949594.09.78BB196 Received: from mx0a-00069f02.pphosted.com (mx0a-00069f02.pphosted.com [205.220.165.32]) by imf04.hostedemail.com (Postfix) with ESMTP id E02984002B for <linux-mm@kvack.org>; Wed, 25 Jan 2023 17:06:12 +0000 (UTC) Authentication-Results: imf04.hostedemail.com; dkim=pass header.d=oracle.com header.s=corp-2022-7-12 header.b=qqwDUn7p; dkim=pass header.d=oracle.onmicrosoft.com header.s=selector2-oracle-onmicrosoft-com header.b=xfm7MMGk; dmarc=pass (policy=none) header.from=oracle.com; 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; 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=1674666373; 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:in-reply-to:references:references:dkim-signature; bh=kg6K/uovRnrO0MaE25vLuqZe0ttrD5ZD9baHCb9erk4=; b=oRImIQH6hXz0fnwIgh7cu0HTcEIEEaropzJE+PfwXdgCm9NhXIc44v//uu21WdztIDC4sg G26CWtUD+F9LiknPY1T2uii+GYwSB6WOi6+kuWskPC+Dsa8nLHTbyvzIbkygBfXErWARyj W/nNDXpPQOEuWJaubjtHTLQG0CSDWsM= ARC-Authentication-Results: i=2; imf04.hostedemail.com; dkim=pass header.d=oracle.com header.s=corp-2022-7-12 header.b=qqwDUn7p; dkim=pass header.d=oracle.onmicrosoft.com header.s=selector2-oracle-onmicrosoft-com header.b=xfm7MMGk; dmarc=pass (policy=none) header.from=oracle.com; 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; arc=pass ("microsoft.com:s=arcselector9901:i=1") ARC-Seal: i=2; s=arc-20220608; d=hostedemail.com; t=1674666373; a=rsa-sha256; cv=pass; b=tU2kn+g2ejF3jJeLpBnWUw2za5CE1UnsesIUu23YSx66CGO1AOAqR1bxKLMa24yZeU6eli XoomduCSpCJWZ5f0HgR76gkziyhMuGh010l8fmWxKuc2lgigSv4sTnL7mdoeQAhZlXk5/D UoUzIkiY3ZR+g0UbwP+bSisf9ad4+cI= 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 30PFQ7nM029151; Wed, 25 Jan 2023 17:05:54 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=kg6K/uovRnrO0MaE25vLuqZe0ttrD5ZD9baHCb9erk4=; b=qqwDUn7pjd4SAw4vIsCzQGgdiTvQlp3SyfQUqV/vqJbb4t3+R027AzXFB/1Q6lfhh0eQ bezbtha+MC2vVrEdRa+/H2oKtJGlDFSkbdQ8TADa6rjQAOoqR+GBtozPWFLmNGxnxyYE Lw/Yg0us4RL6TtqIJVwgDFEd+X3Xq9/KsaVjN8HKS0OY8carToqA6M3+U/aXZOxnAApz HgHvc740n5UaACxM/sOdVdzRK/QWqLjp3J0hTdxIDclr1XHGEyRIEn/nrMbciNJT2ZVE Medouw399I6UpycrAF5bCuu6FXZv6HJE16+fuc+2PLMM5OxxDNczw96Q/MEqdRC7J/Xs BQ== Received: from phxpaimrmta02.imrmtpd1.prodappphxaev1.oraclevcn.com (phxpaimrmta02.appoci.oracle.com [147.154.114.232]) by mx0b-00069f02.pphosted.com (PPS) with ESMTPS id 3n88ku0dts-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=OK); Wed, 25 Jan 2023 17:05:54 +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 30PGGUXF034229; Wed, 25 Jan 2023 17:05:53 GMT Received: from nam10-dm6-obe.outbound.protection.outlook.com (mail-dm6nam10lp2106.outbound.protection.outlook.com [104.47.58.106]) by phxpaimrmta02.imrmtpd1.prodappphxaev1.oraclevcn.com (PPS) with ESMTPS id 3n86g6tsq3-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=OK); Wed, 25 Jan 2023 17:05:53 +0000 ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=T3E7m6wmbp2JkFAaDQyZowX8XHkUMpisMmHAk9kF/wXYM+i+EXDaPHjMNGKEy2n08AG/tCjfNAI4dWEHK52f35OIYWfr+//HqiWMbiladbx3ARVfzwX8bqap2e+qgeudrx1eUmjHngzoVbg+kDytMak6xaxA+pL59TQNvRtRslq0SIjCakV045xbjJWGAJ0MH2LxrRgdYZKDxlrtieTmfMX+8QIeGX25z/rLfVA00vC1DwLmQNYaRGwG9UxkW5vhimZjaD+b8jFvvkEVwhZ1CRNR2K9MUZ2Uxue3Vwb54JMSaXUXhI6S055uOdrMhFJqtYgs6fEyyTqLQ7UsP0OwJA== 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=kg6K/uovRnrO0MaE25vLuqZe0ttrD5ZD9baHCb9erk4=; b=P4tPLbC3Mux5ApNkCS+3ELHezme36v1vWGmu0IUcseb9ic3+yAOpMz2eedN8HTX0jo+SlD64ASt/NYsWk4qw3zSW3gMBKS+KeBY7GDgdD6Z2w7emQHkgpBEbEECkIUxifozfcC1fymNe54TlxNYrL1cIeBFeJIMyqu4rkYMF1lyfR/2+khCJODdt3o7BTByH/xcSUrD+LeeC908/wKReRe3EbMAjHBtvDbNtiSciqtd34jcMAGpHxHtSgyzSb+XNmQoOmoBaRnuEkIvAMqCxizXlVG9zAUAiu886Hw9BamYQXyzMwGa0cgu5iRO9DF7eOIOOdmXONk0yNxk4cEt3lw== 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=kg6K/uovRnrO0MaE25vLuqZe0ttrD5ZD9baHCb9erk4=; b=xfm7MMGkauoejhQzrGTMEBpiXF3gL2srrRapX2BS8oVQF1wJWGrGmn9Odhq/RU1KUmGKMcV/S8U2mqQQzfciTBFBxN0VMdOQB1LcV1RsIon7SjbYjgddT3lDyNWHsiDPr8n+Ej+DS942VmBRQN1d6khBvN93SSIVpqVaqRaJslA= Received: from DS7PR10MB5117.namprd10.prod.outlook.com (2603:10b6:5:3a6::17) by MN2PR10MB4384.namprd10.prod.outlook.com (2603:10b6:208:198::23) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.6043.20; Wed, 25 Jan 2023 17:05:51 +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.6043.017; Wed, 25 Jan 2023 17:05:51 +0000 From: Sidhartha Kumar <sidhartha.kumar@oracle.com> 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, gerald.schaefer@linux.ibm.com, Sidhartha Kumar <sidhartha.kumar@oracle.com> Subject: [PATCH v2 2/8] mm/hugetlb: convert hugetlbfs_pagecache_present() to folios Date: Wed, 25 Jan 2023 09:05:31 -0800 Message-Id: <20230125170537.96973-3-sidhartha.kumar@oracle.com> X-Mailer: git-send-email 2.39.1 In-Reply-To: <20230125170537.96973-1-sidhartha.kumar@oracle.com> References: <20230125170537.96973-1-sidhartha.kumar@oracle.com> Content-Transfer-Encoding: 8bit Content-Type: text/plain X-ClientProxiedBy: BY3PR05CA0029.namprd05.prod.outlook.com (2603:10b6:a03:254::34) To DS7PR10MB5117.namprd10.prod.outlook.com (2603:10b6:5:3a6::17) MIME-Version: 1.0 X-MS-PublicTrafficType: Email X-MS-TrafficTypeDiagnostic: DS7PR10MB5117:EE_|MN2PR10MB4384:EE_ X-MS-Office365-Filtering-Correlation-Id: 9ae529d7-f5e3-4f42-46d4-08dafef66999 X-MS-Exchange-SenderADCheck: 1 X-MS-Exchange-AntiSpam-Relay: 0 X-Microsoft-Antispam: BCL:0; X-Microsoft-Antispam-Message-Info: MHh4HTrhPWV+gNp3KC1//UeEonEAbQoFsyQbNNelWonqzQaI3y2vJs0kavreh1hxfMd7k3giJA5Js3ApzHOhNwXbbCWtZfEQEAwe1B8RjbF2o7+30zNTmKT77moKyLto091VD+IU9TQMMABHc+u2e8tenMGZSYHkKpOzDKxvUWcMMB0dKwHw/QCCNG22SiZE9MADINwjuGErjNWzBQUUNVQjhTBq3ldjd7SxMLZ5rbfZ1iOoI7yKmW1to1RmdIzXjF4ng4e+u2SHKf2qZkZT51otWHvPm4Sv6UHn3//y6OT2hvLal+E2cRuvwlj9S09mU35MyUHSc8GsNMh1nZxh0/EvTiXgDqMf9MAfhWzP9m+mjCu6uAgJQEWxy6uioAUpA04TK8PJXqZQ/7nJZmscqKFmTyszd8wDTz0vR+jyijaFJ+V+F24z7S7OYkIRnq7kq4w1kVUkSVQm0cSXVMCkeMP10ecYukTT2L+/KaukCQRhEBB48I0f/bnC+FwJQbDgbzsz+V91QQhH4yTO5IJ93KhE7P11kdO1OePBRiBIJq3NMGJBZz8OvkWdl36LB2jOFNAI0rFbTh9IY8WGjkKFazto+Ja4dsFH54z2E7nsbuGIe1/UmJ3Ob7fgmSqgW1P+2TlkaxEpuqpnA92Nn2hVwQ== 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:(13230025)(366004)(396003)(346002)(376002)(136003)(39860400002)(451199018)(186003)(26005)(6512007)(38100700002)(66946007)(66476007)(66556008)(8676002)(83380400001)(4326008)(8936002)(41300700001)(2906002)(44832011)(107886003)(6486002)(478600001)(5660300002)(6666004)(2616005)(1076003)(6506007)(316002)(86362001)(36756003);DIR:OUT;SFP:1101; X-MS-Exchange-AntiSpam-MessageData-ChunkCount: 1 X-MS-Exchange-AntiSpam-MessageData-0: lRwKCDUhY0v5II7Rh8aU9MIVFsCZlkjnRuPHUnB5d2+j6oCriw7SNPOEuB8IM1+PR5VNCadMiNzmb4/9mMqTYDsKcUEwU2zGozew+ayGlH2rCmNpmg+pVgjFO5ud9zXymAlyC7jDAtPe+p+F7lI1Ai+VzeOxH90idp6368qxVmP5RHw8Q4PzvbMYZ3I5AnAr6CkjH5lMAZbxockFcgjeecWdaJSsnpLOxFEe3ZXo8NN1F0xZpXEeaayKK1TmyeQ/KXcElBwGFgUxO3SjOP+NodTorrYfDM4DxZeq1cyNw/pSt2mdMzu8WML1G6pdIoaitX1koZbLgg0suWVLkOziiXyipcVxaeTgcsNnltG/S283XqcX6QjnrUizL9Zd4J+UDXIXeOCpY5Js+MqxQV9mHg4Z+EC+OWYyCLEkHvzZGu1papAQ2z/DqB6oaACuQaFqRRKUCd7uaWVqxSvZGrPz3Hs0L5hAXqvUupvM3q9Ms4IVrKPbatBblsj7q9g9rN6ONkCDUCCLCy5osqYrw+Ooxpf6GgaSoMcst4G5IJzzTois5W9VmLeFy8GmUkhC85Hc7aBSpzBsIT6r5GaDCLr50aCDlZthplVzpas/7v3PpXppl0qgICUHS/2icbLoW+OMkZ8e3OoIlRe1hVB6VtX4jZQxtfvumlh04YBO8031KxGuUupy2e5j5j/Ciw7gyd2DZWFVC/nGCa1LLZjq4ScVUVdvDno1dtQ509X9vD8obfPQfu2PfVMYp9l0Pg/LjqGe5Yuhxj4kU0PwhGGo0lwMd/YI4LjkX7GOxq4jjcRZWHj5u3kECYHVhFKTS8n/f8TmSq5apXeUjesXwAem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KoqmCnD+fGjp3TPCSHYZ2gtFOlSzwy5Aie0ARgMwIrZMs7kTrTFX/9AczFMGKWWqq/7zT4nCOmU+PT8/I07Lwv/e3qh3iRy5IWMQo7WLW5yhBTfFUnpzxOeBCnsvUJkRsgylHMbL3Lz8Q5FOvpqNQCRS2pilUDxOWbScNYIT0lpl729DE24DpfbW9WW6ZV0mzxIiwn8gZZaKu/EjS8qt1jy9twGEB9ero6ghuLmPHjb8FDaCNkOXmr+ir2WKj/dmnoe0s1PfilWdMG/zgh4oD15TMuk42n7lw7LIwacfPv5jy5wfjvG/ds8HhxaXhP/ayVtZmKLmxpTUGPt+MqOKmGqMITpiDQ1P+pJHsFM9pu0KJBfUmGAkjkWNkW64sr32eVvYpOPcNRViSnAMEGTwxCV6zFE6TLoNnzzqQ3MlHRxrMhiNP62cYLqesJ2KDA3p6ZXS2OZLjlzg8fHDN3vD1nq4fiTnhI14ljJk2c/HDwdCnMDipL7qq9baJIR32FaBTBDxu4ihGDENU3DA/sLf72u7jzvBa7YZCMN9b3mANvImsuAdoymDTtLMIQcgxGktsG4pMkm0X2XjoOyY40Kl37NQgDmswSF37/ylsszPaL504az2C/6XuznIoP04fZMOO1Tf1fJnuOJ5GZmsKxAp8NVzATmbYCZfcbiOHeSNxiiQV1SAJBsiNFjIdHbKXskAriDfzPgt5AHYQSzPQJemIRThcC1+zHznvB1nZ+tnFIbDUUpkVVR3S/bHtq/qPju70LftAg= X-OriginatorOrg: oracle.com X-MS-Exchange-CrossTenant-Network-Message-Id: 9ae529d7-f5e3-4f42-46d4-08dafef66999 X-MS-Exchange-CrossTenant-AuthSource: DS7PR10MB5117.namprd10.prod.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Internal X-MS-Exchange-CrossTenant-OriginalArrivalTime: 25 Jan 2023 17:05:51.5283 (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: ha5phOlvjnGgBhLAySqbvJNKXk915/EAvWTmRJYgAyInj0OhhpdeJsR+f1jG3SjvH8Yj871ueEUk6NAb6XKfPK0w0qmKfxcnxjb6uu8rmaE= X-MS-Exchange-Transport-CrossTenantHeadersStamped: MN2PR10MB4384 X-Proofpoint-Virus-Version: vendor=baseguard engine=ICAP:2.0.219,Aquarius:18.0.930,Hydra:6.0.562,FMLib:17.11.122.1 definitions=2023-01-25_11,2023-01-25_01,2022-06-22_01 X-Proofpoint-Spam-Details: rule=notspam policy=default score=0 bulkscore=0 suspectscore=0 malwarescore=0 phishscore=0 mlxlogscore=999 adultscore=0 mlxscore=0 spamscore=0 classifier=spam adjust=0 reason=mlx scancount=1 engine=8.12.0-2212070000 definitions=main-2301250152 X-Proofpoint-GUID: cEHhU-R-nztFGelfKgcaqYl945ldQ-Ei X-Proofpoint-ORIG-GUID: cEHhU-R-nztFGelfKgcaqYl945ldQ-Ei X-Rspam-User: X-Rspamd-Server: rspam02 X-Rspamd-Queue-Id: E02984002B X-Stat-Signature: ootcsajs9qupcn1dyqsnsonckcecprg7 X-HE-Tag: 1674666372-236948 X-HE-Meta: U2FsdGVkX1+cdZC2xnX32A2hSJpiGS8IzVzyB+TuvCwQc0VAjOvX3WImCEDd83JzU55xFMTuPSa2yRKFcpisUy1gXbNMaCNcnCRqtgLYZ1uZdDwmhuMtduwcn4pz4KN4pFU6xf6bbyWjzlRW2b9joOKC6XgN82KxzefvxxAuF5B/AJ1Kn0h/ekm58utbPteLR+WRPyZBs0b8BiqoxF6rzMJET/P2ZZeiNQ/KUYij8JtbGEu2O/bReO8Ae7aYMJsvrc2/2C33j53OtO8B/Yu0UlMHOfDdGf7ZThiw+p0Ym4jZp89+jfJd7QC7vQDxHyWZgQuJ8aTE7+pOOBSOJDzEwR1FAe3H8MwUrFOepxiqlx1MtGJkt44Nb6fFUoWhxFdNBaYUhEkakwiQUwvS/HKZZ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QHAk8DhhVFNHqPFG3qhQ== 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: <linux-mm.kvack.org> |
Series |
convert hugetlb fault functions to folios
|
expand
|
diff --git a/mm/hugetlb.c b/mm/hugetlb.c index 849206e94742..e506a46b7871 100644 --- a/mm/hugetlb.c +++ b/mm/hugetlb.c @@ -5651,17 +5651,15 @@ static vm_fault_t hugetlb_wp(struct mm_struct *mm, struct vm_area_struct *vma, static bool hugetlbfs_pagecache_present(struct hstate *h, struct vm_area_struct *vma, unsigned long address) { - struct address_space *mapping; - pgoff_t idx; - struct page *page; + struct address_space *mapping = vma->vm_file->f_mapping; + pgoff_t idx = vma_hugecache_offset(h, vma, address); + bool present; - mapping = vma->vm_file->f_mapping; - idx = vma_hugecache_offset(h, vma, address); + rcu_read_lock(); + present = page_cache_next_miss(mapping, idx, 1) != idx; + rcu_read_unlock(); - page = find_get_page(mapping, idx); - if (page) - put_page(page); - return page != NULL; + return present; } int hugetlb_add_to_page_cache(struct page *page, struct address_space *mapping,
Refactor hugetlbfs_pagecache_present() to avoid getting and dropping a refcount on a page. Use RCU and page_cache_next_miss() instead. Suggested-by: Matthew Wilcox <willy@infradead.org> Signed-off-by: Sidhartha Kumar <sidhartha.kumar@oracle.com> --- mm/hugetlb.c | 16 +++++++--------- 1 file changed, 7 insertions(+), 9 deletions(-)