From patchwork Fri Jan 13 22:30:56 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Sidhartha Kumar X-Patchwork-Id: 13101707 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 B8146C3DA78 for ; Fri, 13 Jan 2023 22:31:47 +0000 (UTC) Received: by kanga.kvack.org (Postfix) id 6554E8E0006; Fri, 13 Jan 2023 17:31:43 -0500 (EST) Received: by kanga.kvack.org (Postfix, from userid 40) id 5E1858E0007; Fri, 13 Jan 2023 17:31:43 -0500 (EST) X-Delivered-To: int-list-linux-mm@kvack.org Received: by kanga.kvack.org (Postfix, from userid 63042) id 03DBA8E0006; Fri, 13 Jan 2023 17:31:42 -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 DC4218E0001 for ; Fri, 13 Jan 2023 17:31:42 -0500 (EST) Received: from smtpin02.hostedemail.com (a10.router.float.18 [10.200.18.1]) by unirelay08.hostedemail.com (Postfix) with ESMTP id 94AE6140A84 for ; Fri, 13 Jan 2023 22:31:42 +0000 (UTC) X-FDA: 80351224044.02.50B234C Received: from mx0a-00069f02.pphosted.com (mx0a-00069f02.pphosted.com [205.220.165.32]) by imf27.hostedemail.com (Postfix) with ESMTP id 4E82B40017 for ; Fri, 13 Jan 2023 22:31:39 +0000 (UTC) Authentication-Results: imf27.hostedemail.com; dkim=pass header.d=oracle.com header.s=corp-2022-7-12 header.b=k9zcBAHm; dkim=pass header.d=oracle.onmicrosoft.com header.s=selector2-oracle-onmicrosoft-com header.b=tq6pBPjh; arc=pass ("microsoft.com:s=arcselector9901:i=1"); spf=pass (imf27.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-Message-Signature: i=2; a=rsa-sha256; c=relaxed/relaxed; d=hostedemail.com; s=arc-20220608; t=1673649099; 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=JSuCthEGD9mFVQwtGBQpQYgIPpxHUVzJky4kAU11Yd8=; b=wRSBmKQoj8igKVLaBQgNu3w1excMrOQWRRPXqoZnTUh1ZS2KWIgor6dMeLQ81L+l2gzzEx OOagE3dtYoadYV3jevJW9m/U4I97pQRAV8dd0L6FSYXotDxADRe6coKMCy7yEXeB3JAnl4 7LbUne5oU+KUeqlBr+L3lLtsLl4UzMk= ARC-Authentication-Results: i=2; imf27.hostedemail.com; dkim=pass header.d=oracle.com header.s=corp-2022-7-12 header.b=k9zcBAHm; dkim=pass header.d=oracle.onmicrosoft.com header.s=selector2-oracle-onmicrosoft-com header.b=tq6pBPjh; arc=pass ("microsoft.com:s=arcselector9901:i=1"); spf=pass (imf27.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-Seal: i=2; s=arc-20220608; d=hostedemail.com; t=1673649099; a=rsa-sha256; cv=pass; b=pKu+JokM8vKqGTif892K2t6JAiMLFBU7Ea8aigwIzEUoS7ISoVeyqWp7C92+laffWaqsGf OxCPzlFW0mL3GvPJVrlet3tKNHpwe3TRmF7jZI/Mvo5PD0iKkyshA9Dau0fB4SOsirnyu2 Cp1Du+zNCUXiIqwmmRsX3B6lBgVOCjA= Received: from pps.filterd (m0246629.ppops.net [127.0.0.1]) by mx0b-00069f02.pphosted.com (8.17.1.19/8.17.1.19) with ESMTP id 30DLYhPP015861; Fri, 13 Jan 2023 22:31:16 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=JSuCthEGD9mFVQwtGBQpQYgIPpxHUVzJky4kAU11Yd8=; b=k9zcBAHm7ighNBzTNll3x70ykerRhWlMQIObu67JpHW6szowhyfO2t3vctzZiZYlZq50 5ygl5YDFo4oURmK86asQTki6aLhoBVBicPa2LZXu5cKgObGT/qWXBoB2jfQvR34gyeOE qInbcnH+g7h1XLg3jETw8xLF2j01tM7IKs+eD0rf11Qj1WkIh1vxnhzRFL1r0vExEQSD iT4tLr4w1ivB+1hmdi5k40sW1s7vCK9nP/ujExmhIiaH0sl48pNDsp7ar2e39OBk6Abv qiE4goS6Px1rBTdtRhk6BVXfnjFvyeEAKhVIDnMzUFypYMbBqBmDRGP4biAKQSqjoJBy pQ== Received: from phxpaimrmta02.imrmtpd1.prodappphxaev1.oraclevcn.com (phxpaimrmta02.appoci.oracle.com [147.154.114.232]) by mx0b-00069f02.pphosted.com (PPS) with ESMTPS id 3n3av80phf-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=OK); Fri, 13 Jan 2023 22:31:16 +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 30DKwdPV006693; 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-2 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=OK); Fri, 13 Jan 2023 22:31:15 +0000 ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=R3qwwdmQIIr41OyH3VJcEb98gJatl6EX+A6HDELIudBUTWyBZxLB3wUEeLQF8/q7dYaqnqec/w7lWVI00lXF6ghmgwsLvCMJWhbfSsMZjYKCL2wCkW1FUiW9A8b22s0IulPMKCois86lUdVJyOvfr64AmFnFfh588cGS9wWgW5fGoj9UsTHHXMyNcv5+7uQZ0FjxjIbwcXX9wG3twjQvMHju8hQlj68HSTd2UXYEfnp0AGvoXxoyaudAZYzgAx7p6CwJeEPBhnlsMUXucKe6kqZ7E64+kw/oeTP1RKDGm1v7GmxIIhFpSR6HrMwWSUoYGiFwfspTOrht4G0rrXvhaQ== 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=JSuCthEGD9mFVQwtGBQpQYgIPpxHUVzJky4kAU11Yd8=; b=h6i6Q8R/nKcqJFpiPcfsf+npzun/SH6g54hhpnPunS5ZKogdVamfzJfIH6ZPE6PcKgYCwZAWsX626gsEKDmcD4eQcN/GY+QIydrtY/yjBNs86d9oTEs1YTuGEJU0C0s0+wUEBIFYKXiMFWUwuo6vU94Hv2EzZnywcu+nxTrBx/FExq6vGgtvo5KcWaDtGJ0mm6hajjAebALSdcWR19TOLo+jt+O/KXx8AM4ZXWioDT4LQReWLW3272eFbskm83LJaiTfINsj2zNTcAPUu9uv/O9IGjgJd9qIdnsx5uLiNFIGe5rCOW2OH+ix4r3nh2DWdU5sdW9zheNYGp5HMgwUig== 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=JSuCthEGD9mFVQwtGBQpQYgIPpxHUVzJky4kAU11Yd8=; b=tq6pBPjhzrADvnJ48bgAgb7cdylmkPLp7Bqh/y/6KsoEIF5uhWbY0Lk63mYm7P/BFCVuAymVCQ025spURcMDr+QU8YJ4tHQYlQPWWlOUdi6Y7aoQ7wv2Xee0c/hJNd/NWOMcNkdzZPzzO/ti+OJGRuZx8C3krqd5soo0sMnFhUE= 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:13 +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:13 +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 7/8] mm/hugetlb: convert restore_reserve_on_error() to folios Date: Fri, 13 Jan 2023 16:30:56 -0600 Message-Id: <20230113223057.173292-8-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: CH0PR07CA0021.namprd07.prod.outlook.com (2603:10b6:610:32::26) 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: 15eb3f18-121f-442b-b1e5-08daf5b5e0c7 X-MS-Exchange-SenderADCheck: 1 X-MS-Exchange-AntiSpam-Relay: 0 X-Microsoft-Antispam: BCL:0; X-Microsoft-Antispam-Message-Info: +h0wskAd24U8NZcCTltxm//scDJMWT4Rnqp9OM6OAp56uZD7YzzhRGHPvCDLNhuqdF6/NdFM21Knoemo0IJ8GWO25WGoMl03m5SNdo+2kyWebC5xeLlYo11rwF7fKtrbB+uT7GSlwlUNDi7qrf9xafrHh7cbId1unGvXtp4Eu+z1BVqN0Vyym7I03LEZGyjmb30Wbv4HgCK6aiZsst+44t0VfwcdhGhPubBnR9wUDgB/1ZECgGhNdY7SkEl2mxWrk3LlDTtDWfLYmN06VSoDTIKZR6JlB0kj8TrBvXsMPdZrDJryZTqPN0OMZmPiCjavOYIWaLCJMWgcoAOnbzI+mQbhX2/Xs5U7blDuXEuWxVSqEG/jqGscV95EZTkqpzr6e8cPs4/Ckll6oZYf2Uceb3RoL7eiQzeewZGhbtAEF4/iFwC14NMy2jJS5xorrxCd8nWtNj8Pw4BmSre0/XJugDIynhqiLBDOi5MfZgGndxU235XL7ptWaMlOkq3SOyaZlvkq3JfuHqJdWLugclYiOBMurrMoJgk/Vjy2I0GaVHoSgqO9005A/vs1JFff0g9MfUbQwY49/5HhvzGo3fI/bIyu1JreLzaDq0tAWcAu5C3rjGNVahA0JgOjoFs+ve865oT9fR7GeToxADjlb6JRnA== 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);DIR:OUT;SFP:1101; X-MS-Exchange-AntiSpam-MessageData-ChunkCount: 1 X-MS-Exchange-AntiSpam-MessageData-0: QxvetK3TwS2Mh+SE+KgToFOY5HxuN7OZGD9RGLpkDnc7d8kTLjCqs9v8LR1SEhw7CUsT7VndLQVXrWTxpoZ+6sU3dmJhEiteMYvV+f6CeAHzDecSNEqDkWXrejTcYg+A4MjHb+Bgc/cEvK8mya++sP9xR7AfCeQIATxyFwblMQT4BYd5Xx9V5Zmy3YVaG4B0NHgkJNW5Avds9wfLE2okTxzTGgt998zShGPqps7OHzSr+iGglbla/eBkvHiUBOZGPZNmlqaU2+mYqB3FU4oaY9QCB9yIvzInXTnG4fZk3U4jrexU2VdtrIKWPQ+aaSJ/9+bYDe2+ZQypFgkiI4cnj2+UD9Rfze3qB3bM0oZXzkAlgBvno2tDZVWWtzwLC0Ow2Lql1o4kmLNaQnIfr6hU+FsGcktu8dYVWCv8xa6vzwIHZQclurrUZt0JOOYZpEPtyZGuPBPSwWgPG5nukg8Ig0oPRqVGOTgH+ifXULk7wJ1+XvPYtquHCtO/cb0H916DppSQ7zCmpAdL+JUR4rnJBKj1Lb6+0Skb4NSxqY47UEoM9e1perLd12JY1p4j1f9t4QtIoZdpjVSq4KSyjUpTgJerKblSBnPe3/gfyQ9noZuzuf+KYSUTKtx4DVgB+5V6Yqt17LSUyDm5l8hK2EXEkvfM6mxlXzQjOE2XL9MFTzigmTXJ0AwJA2eCFrZ0ydGqy1fHKoWtFttTSCmmVnkhAxz2LSphzlnuhuZY2gu7EQVWJOugm09XyCZ8N/Z3GiQaWov2Wy21AcPBhSOz53VNOauCT7ek6BAY01fPJWNsQqgBcwOtlWH0M8q0JfH9ZmCqFBCaQ+wk4OsS2Ww3NbOk6CaNZmaj8OWtx+HzfX6TXCF7JPcp1vharEalcanT4NvtfyxUkWAEC5/x+pgp8VbX6pek286t7w9i1e4Rme4EnP906skBMtyaztLOJ+htHG2bQZO7/l0JOp7Io2eBD9KkkCmMe04uuj4/HBmRhwEE/jRO3CSdJSFP2HNtId5zTF80VRWnuDtFUlpBz0f032DUPB4hGkUXwzjy86TyUAexgIXWib1Eu/1lB7cd2mOoYz6Uc3fOWTVpGulb3AdyzQ/c2ox/ZeRzPFprjGpOjES6TCjBoja4GZFBs0xH9N0ejcI9yktppDFDg+3qVw/2kTYpghNxj8KzDJvIHEKkBI5GyiggmYcMpgSALksQrcRW/TVa7/Y0uUefShgv+49Odf4qC4kPgIyb+YZckdRCwNn2K4AT4uOJJbyevU0hjxrxOAcl/nVVxpA91IvuxprfspNkGQShJj95p350QIr+LsiEWB6Z62du5BBPAr+6a5vU5mYn5aCcn7/Nng/Cu4ClTctGpAQjxjXq+IEo/8DDl2E2J4uuk8NpxA9cewcahvQKT4CQ4s2OSF2wXwT2L0C7Zg+FNYvXIEjULztJPGuUaS4rJxy8v1lM8oPX4g8iFIiC/bEGykzAq/ImUqbibv0pyMssOrVnRJyw3lNNontGNK+bNjR7PhqS5Mdbz6MVaHy/rWRt4lOfbxEzgwtK/objrLuE0S1arItMd80uSHXpFIHbiZ5eTsVAn/XWW6i+To1bMmSM4fJcTWfs0iMisqIsQDpxSQ== X-MS-Exchange-AntiSpam-ExternalHop-MessageData-ChunkCount: 1 X-MS-Exchange-AntiSpam-ExternalHop-MessageData-0: K7tKzR7MXEZVYBwa4fl8CI4LRwPC2LdoGqQEmwAxE8k3Bd7hy2dH3fxWmK2w+m4dV46lona9FlWJA5+TK0NZGVJwDQhdlXho+zM5myNvsV3DNlhQVqxFW97yKe4/OfUmJjNWAplgBxQbdWYHR+fSP1b8TbwjIQ7YDS8MlnVWw9MJEK0JC6+2+srpbfIUneGscsXI87HeTo/UtXFHBXYxgE6qyltLoKZJ2QzHFd/mVUnpEWvcVsRJSbn89QUeRPKRxjPC8efZLmhOdLQPPf24fou2CP2/1vSdBamQ8YS9eYOtsdtcCAXZ3RntlBJIYmk9MCzwRGdOJjmvtpJKA+ll7lpKmUbwY1R2JA+kfIim24Mql8NtWgSnXFWK+eqv7ClvEpdomzvml49gip7VHV1eEY0SHzcrEd/M8m2MhwyLjIDsDAdUXAxwKFbgE0qdJiQNO65Qx/H70fHgq6ms+yNBAVyFGMzBz3V7fDlkNt3ehyMEg9ih+uForfEOqRAItp2I/fC0r7sq0P0x2jJJQ/awv+7ava64UKy1aMVNgFexU+6z4GNPzORqkvVU3KHkyG6yi0+ch6rdMPkQ1tHIOh7f0afIsJmnJJTSmOt5oid8rzg5kZvXiZEROzUzHja2vo5mFun0iqGC9zSGUrnRm4lNfyIHBSJlHCVPzoOcySlXLVPFvOXTzIPJVdlPAbzLZjjQAwlv3KTGWgK8jM5dODKYaIHcm0HxJP5a9Zv/T60JrksZYbDxNGRutbyv5i2Ij8i8RqudhVu0nwRgKmGROVxOVDCsM43Bm0R9x/bLjsAAE0xg8lGFVUdc2vlmNnd0Pu2b7rMNNl3E8wyCOPk4McqSXRviM4RPIBD0CotTm2uWkTisrQjNP1q9ZUeOeix7fQ8h/ZUFOaboHQvJxxq8lBmVbJtLXSG2RPbqAbaroCz/t2n3IDYBm++PDuvEKD6XUXBZ X-OriginatorOrg: oracle.com X-MS-Exchange-CrossTenant-Network-Message-Id: 15eb3f18-121f-442b-b1e5-08daf5b5e0c7 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:13.6509 (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: GKoedDfAvgXV6n76aOwJ7bYcqGLQfzNLRg6mL/PecsetJQS8RTyFM5Iq+LiFKNIRsWHt7JrjV5YN+BlrK2YTO5zPAFG6ZKAgsvyoeFfX1w8= 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-ORIG-GUID: pv1G2gLvH0lszx2CIc6ZUUJVxyxK0i7M X-Proofpoint-GUID: pv1G2gLvH0lszx2CIc6ZUUJVxyxK0i7M X-Rspam-User: X-Rspamd-Server: rspam03 X-Stat-Signature: zzbft9og757dbo95ui6ikq5eckpw9fr1 X-Rspamd-Queue-Id: 4E82B40017 X-HE-Tag: 1673649099-29228 X-HE-Meta: U2FsdGVkX1/OtYSW+FvbElDprGuwptUnQplvihYZLK/4g7g+1fmD8cyCU4xCW8JVt3mOJ0ne8PH8Vvkpbsk2jfS0YPmfAdYesSXdSlA78B8WHLqTv7RVNiYn9Q8zlKrf/uNBIQLPw/E28vNlJx1qQAHPXLN3qzqYyrhV2Jg14aFIyUwDr9RB6wcA86EmVTJt6CbXkHFYkeRjsrurPb/6CWVx1mKZIWgbqF1yfoFP0unt2cDN1VcnuSQzcHbBJXN9uUvtqo+780jtvqv0AiQ8wgOtfA1xUNeCCmQl9Y39WHXp2Y0qyn+AjNNyR+cOEw060cFdqxMnmwir/CoQYykag/NLL/3DcFaRGDuOGxEhLF72Z/65ic0Pmnc3gHazBXiV8SDiQ0tZwWmdTavVPURkhKuuoAmWtCAw2C8z7UU9mEhPvd/rKFXsuS5mIhMNAqVINw5hEn0E0l0KWVu1G41z9qkid7LW2FP04awTmQ+giwK9H6Xezpj415xStrQmT8nuk0+/8s4f+XFo7ro/zri4gD+NDLpPufx2ExFDxr/F+nqfcmzig0pFhNFHyga4/uf/tglNrIrVB7yyTq1fMrWWPtUk2u0ex1nf7xWYOXJGwt2NorXC47u4dat7tcu8VzZyeP8XkMUj1BmAQXiuJO5DA8yqhQ0MeT5PYW30pRQQuBFIJgM4d3LyF1nc+U+v/+SsYg1ah2ZjJEGHJPXbkSdDM67aREYkyFR5UPxNPkZaE7vdFqxokeFyHOpSGBO03ak+1Pciuhsj6gTDDaGPWrUx9Bp7NXie4rugOo3+94JSN+e4hniqvDwm3ukXa326lujOT6ALwJnP/1dN2k+beytPAb9626sYNvmgp46kK7CF0IA0m5Gb/KqQ5pHgMdkEznjBnACuH3wO+ZspM0G3IzgkmFq+l3x04Ohbd5kNfyFQ8xxuoQ8pPqxtmQLqQS5cHs9GGpCqZnLY+UvzxldAN+C YUYaimYm uW6REto2ity/pjRC6aVIyXmgCwAYnKfv1o+Tsn1oOCJMloqCaOXYWsy8uX3CFnwpArntFnwahNLubaw0hBZGxNLeqFYeqv4B6rrh6JV3IK+cO+zumyS+ODZO4ZMqEGmNvusBTsJXpi2M5wJPVhPcqKYD8tA== 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: Use the hugetlb folio flag macros inside restore_reserve_on_error() and update the comments to reflect the use of folios. Signed-off-by: Sidhartha Kumar Reviewed-by: Mike Kravetz --- mm/hugetlb.c | 27 ++++++++++++++------------- 1 file changed, 14 insertions(+), 13 deletions(-) diff --git a/mm/hugetlb.c b/mm/hugetlb.c index c0cfb075cd58..f8cd0c694fe9 100644 --- a/mm/hugetlb.c +++ b/mm/hugetlb.c @@ -2675,22 +2675,23 @@ static long vma_del_reservation(struct hstate *h, void restore_reserve_on_error(struct hstate *h, struct vm_area_struct *vma, unsigned long address, struct page *page) { + struct folio *folio = page_folio(page); long rc = vma_needs_reservation(h, vma, address); - if (HPageRestoreReserve(page)) { + if (folio_test_hugetlb_restore_reserve(folio)) { if (unlikely(rc < 0)) /* * Rare out of memory condition in reserve map - * manipulation. Clear HPageRestoreReserve so that - * global reserve count will not be incremented + * manipulation. Clear hugetlb_restore_reserve so + * that global reserve count will not be incremented * by free_huge_page. This will make it appear - * as though the reservation for this page was + * as though the reservation for this folio was * consumed. This may prevent the task from - * faulting in the page at a later time. This + * faulting in the folio at a later time. This * is better than inconsistent global huge page * accounting of reserve counts. */ - ClearHPageRestoreReserve(page); + folio_clear_hugetlb_restore_reserve(folio); else if (rc) (void)vma_add_reservation(h, vma, address); else @@ -2701,7 +2702,7 @@ void restore_reserve_on_error(struct hstate *h, struct vm_area_struct *vma, * This indicates there is an entry in the reserve map * not added by alloc_huge_page. We know it was added * before the alloc_huge_page call, otherwise - * HPageRestoreReserve would be set on the page. + * hugetlb_restore_reserve would be set on the folio. * Remove the entry so that a subsequent allocation * does not consume a reservation. */ @@ -2710,12 +2711,12 @@ void restore_reserve_on_error(struct hstate *h, struct vm_area_struct *vma, /* * VERY rare out of memory condition. Since * we can not delete the entry, set - * HPageRestoreReserve so that the reserve - * count will be incremented when the page + * hugetlb_restore_reserve so that the reserve + * count will be incremented when the folio * is freed. This reserve will be consumed * on a subsequent allocation. */ - SetHPageRestoreReserve(page); + folio_set_hugetlb_restore_reserve(folio); } else if (rc < 0) { /* * Rare out of memory condition from @@ -2731,12 +2732,12 @@ void restore_reserve_on_error(struct hstate *h, struct vm_area_struct *vma, /* * For private mappings, no entry indicates * a reservation is present. Since we can - * not add an entry, set SetHPageRestoreReserve - * on the page so reserve count will be + * not add an entry, set hugetlb_restore_reserve + * on the folio so reserve count will be * incremented when freed. This reserve will * be consumed on a subsequent allocation. */ - SetHPageRestoreReserve(page); + folio_set_hugetlb_restore_reserve(folio); } else /* * No reservation present, do nothing