From patchwork Tue Jun 4 17:41:29 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Sid Kumar X-Patchwork-Id: 13685727 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 8662EC27C52 for ; Tue, 4 Jun 2024 17:42:24 +0000 (UTC) Received: by kanga.kvack.org (Postfix) id CB4B26B009B; Tue, 4 Jun 2024 13:42:20 -0400 (EDT) Received: by kanga.kvack.org (Postfix, from userid 40) id C57176B009D; Tue, 4 Jun 2024 13:42:20 -0400 (EDT) X-Delivered-To: int-list-linux-mm@kvack.org Received: by kanga.kvack.org (Postfix, from userid 63042) id 84FEC6B009E; Tue, 4 Jun 2024 13:42:20 -0400 (EDT) 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 5810B6B0099 for ; Tue, 4 Jun 2024 13:42:20 -0400 (EDT) Received: from smtpin21.hostedemail.com (a10.router.float.18 [10.200.18.1]) by unirelay09.hostedemail.com (Postfix) with ESMTP id F005380B7A for ; Tue, 4 Jun 2024 17:42:19 +0000 (UTC) X-FDA: 82193925198.21.921DC6E Received: from mx0a-00069f02.pphosted.com (mx0a-00069f02.pphosted.com [205.220.165.32]) by imf06.hostedemail.com (Postfix) with ESMTP id 9288418000E for ; Tue, 4 Jun 2024 17:42:16 +0000 (UTC) Authentication-Results: imf06.hostedemail.com; dkim=pass header.d=oracle.com header.s=corp-2023-11-20 header.b=TFj6PSl5; dkim=pass header.d=oracle.onmicrosoft.com header.s=selector2-oracle-onmicrosoft-com header.b=KzoQK3E7; dmarc=pass (policy=quarantine) header.from=oracle.com; arc=pass ("microsoft.com:s=arcselector9901:i=1"); spf=pass (imf06.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=1717522936; 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=J2czIooQkE/g6w6qgk9SmtCs+2RK3cL0MxygBDJoS24=; b=Vqm912q+WwEN0PuQc+lP48OZJLlHGP9zl/GVLibsOuQro5ULzTfAmBdOkTovc89hsNw7/7 ZHEX/rtgJTuAi8rX+XEZyg6j2BvN3mefz7NR/iEIa4JPsgcRsIj1sf/Sg4RE8KgZM4CXBc CaItDCkqm9tbgFdJwUu4g7qJEjBKPd4= ARC-Authentication-Results: i=2; imf06.hostedemail.com; dkim=pass header.d=oracle.com header.s=corp-2023-11-20 header.b=TFj6PSl5; dkim=pass header.d=oracle.onmicrosoft.com header.s=selector2-oracle-onmicrosoft-com header.b=KzoQK3E7; dmarc=pass (policy=quarantine) header.from=oracle.com; arc=pass ("microsoft.com:s=arcselector9901:i=1"); spf=pass (imf06.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=1717522936; a=rsa-sha256; cv=pass; b=YLawqWsKwOFH8nKjT5IhpYmGdSEQwoRe9K+Be++gqNb9o1K0jjY+Xs6vVM6ppPeis+dH62 +3OLKqYhuAw3HBxn6lNoueVEoVHW7UAr4e1/iDWEnSaIwm1RYHed2QU1fxRzA10BK5exmB 7nb+NawfhbL+A+CyleLfN+A+8hLPayA= 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 454BnWuW032255; Tue, 4 Jun 2024 17:42:04 GMT DKIM-Signature: =?utf-8?q?v=3D1=3B_a=3Drsa-sha256=3B_c=3Drelaxed/relaxed=3B_?= =?utf-8?q?d=3Doracle=2Ecom=3B_h=3Dcc=3Acontent-transfer-encoding=3Acontent-?= =?utf-8?q?type=3Adate=3Afrom=3Ain-reply-to=3Amessage-id=3Amime-version=3Are?= =?utf-8?q?ferences=3Asubject=3Ato=3B_s=3Dcorp-2023-11-20=3B_bh=3DJ2czIooQkE?= =?utf-8?q?/g6w6qgk9SmtCs+2RK3cL0MxygBDJoS24=3D=3B_b=3DTFj6PSl5ia9dSPD43pquT?= =?utf-8?q?RwxDNVFUN1Fh/7n+SM44iPwcssTfS61W3nfXjM7M0bFvMIh_YsnwEDmtm2B5/verp?= =?utf-8?q?vAfyv8wGpMFMSjWwtBaXw/b24vIU8QjInAOg6fejMTd8RMfcNLT_Ppu2AJ0eFC7aC?= =?utf-8?q?mgxggK/CrPPeHfCYbfRp4sR+YrtVnRMck2fuOa/vVg9rg+XU691pluG_l4jwDklxD?= =?utf-8?q?3LrdarnuXANzb3F4QQHtjJVIIcM+L2/VOWCR98LskK1MFvwX/erPJflaX6B_t4qel?= =?utf-8?q?cJr5JRCZI60pQh7zk02aw8U4CShDbc6dOLZxiF2XCk/pbqh5671xbHFAQsaBA7m_y?= =?utf-8?q?g=3D=3D_?= Received: from iadpaimrmta01.imrmtpd1.prodappiadaev1.oraclevcn.com (iadpaimrmta01.appoci.oracle.com [130.35.100.223]) by mx0b-00069f02.pphosted.com (PPS) with ESMTPS id 3yfv6u5jg6-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=OK); Tue, 04 Jun 2024 17:42:03 +0000 Received: from pps.filterd (iadpaimrmta01.imrmtpd1.prodappiadaev1.oraclevcn.com [127.0.0.1]) by iadpaimrmta01.imrmtpd1.prodappiadaev1.oraclevcn.com (8.17.1.19/8.17.1.19) with ESMTP id 454HL73d016288; Tue, 4 Jun 2024 17:42:02 GMT Received: from nam10-mw2-obe.outbound.protection.outlook.com (mail-mw2nam10lp2048.outbound.protection.outlook.com [104.47.55.48]) by iadpaimrmta01.imrmtpd1.prodappiadaev1.oraclevcn.com (PPS) with ESMTPS id 3ygrsaf2s6-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=OK); Tue, 04 Jun 2024 17:42:02 +0000 ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=imMNGlxodska4MKW+/c/GVXdCwTy1wscKfpLgWFogRWuFKkVdih4JcYWNt1luxDeStziLVXwreyonO0y5qhh0KSdD4CeHGl40761v0I2oIv+0adA2rnTcc8qM0l7gAi0TVKaHzwcoAAMS4Cnrx0+Gbd2srqtecuO4Klcdi3UeRAtGnT59QbCiqmFYEP8XFh7ABMNN/1wZqW6micajYHk8SkmfQ+ZTW2r48Jrr3Du42ZImJL/RUJ7FmV+SANKVydv69s/rGMIWVjGjxCw+hCSUHan+NfosP5YzdifFKCfSaOQT4CcNWTLwxgseE4ikVyCIvVbBiKdx9ijDh3nGOSkDA== 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=J2czIooQkE/g6w6qgk9SmtCs+2RK3cL0MxygBDJoS24=; b=D1IP5T/GJPREGxrXj2sANkBlS4LN2V0XCgmDo+MaAubzIyYrorOxh5PJqZllD70x1M1ajlH/upZl2PsRdvL70w3Y/Uisdyk9d5DYnJOra9fMTTxpnsRo36M4jp3U0/ztUwIRAghV56BOJA8tnHkqocL31rGOgZZG+XfMTvHdQe2POY7usdDpF+TxlebxIJx/NfTeZjvmjeJb8z9nJ+xn2x1itFo282DTVdd93M455N5uRB6zjcy+50G6u/I7ZFVkBm6u26QJJn+Tizt9p9c5hEcTk6DVQ4cNd5dfUGvI5ects1HJOCWYdRl8qft8HNmo1N4dRIOlxNRWIB9vrNEv8g== 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=J2czIooQkE/g6w6qgk9SmtCs+2RK3cL0MxygBDJoS24=; b=KzoQK3E7GSgCxaF4ojeYk8Rfk1h4/KZ++KrFezraO+Y6Ze9VUUCz/LpxdW8UZQNemae8h2+6Wzznw59khKo9+k6xaHtn51JrayYJfDeiMYV4r7GtbnVMPfdJWIwLIANIwS4c54K/vQTIGmIkx2E53ivYYG9H6l4kMhAOQ1IrzJI= Received: from CH0PR10MB5113.namprd10.prod.outlook.com (2603:10b6:610:c9::8) by DS0PR10MB7269.namprd10.prod.outlook.com (2603:10b6:8:f3::12) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.7633.21; Tue, 4 Jun 2024 17:41:58 +0000 Received: from CH0PR10MB5113.namprd10.prod.outlook.com ([fe80::eab6:6dcc:f05f:5cb2]) by CH0PR10MB5113.namprd10.prod.outlook.com ([fe80::eab6:6dcc:f05f:5cb2%7]) with mapi id 15.20.7633.021; Tue, 4 Jun 2024 17:41:58 +0000 From: Sidhartha Kumar To: linux-kernel@vger.kernel.org, maple-tree@lists.infradead.org Cc: linux-mm@kvack.org, akpm@linux-foundation.org, liam.howlett@oracle.com, zhangpeng.00@bytedance.com, willy@infradead.org, Sidhartha Kumar Subject: [PATCH 02/18] maple_tree: introduce mas_wr_prealloc_setup() Date: Tue, 4 Jun 2024 10:41:29 -0700 Message-ID: <20240604174145.563900-3-sidhartha.kumar@oracle.com> X-Mailer: git-send-email 2.45.1 In-Reply-To: <20240604174145.563900-1-sidhartha.kumar@oracle.com> References: <20240604174145.563900-1-sidhartha.kumar@oracle.com> X-ClientProxiedBy: BYAPR03CA0012.namprd03.prod.outlook.com (2603:10b6:a02:a8::25) To CH0PR10MB5113.namprd10.prod.outlook.com (2603:10b6:610:c9::8) MIME-Version: 1.0 X-MS-PublicTrafficType: Email X-MS-TrafficTypeDiagnostic: CH0PR10MB5113:EE_|DS0PR10MB7269:EE_ X-MS-Office365-Filtering-Correlation-Id: 93d3113e-246c-4ebd-3752-08dc84bda21d X-MS-Exchange-SenderADCheck: 1 X-MS-Exchange-AntiSpam-Relay: 0 X-Microsoft-Antispam: BCL:0;ARA:13230031|1800799015|376005|366007; X-Microsoft-Antispam-Message-Info: iXDGFoBW/C25LblL/Bvqk1yv4kP+n+uR8Co1U9FDUM6Cdn98ecVADQxeWfA90fNo6aTtOUd26bVpJdk3miF/DOtzWDob6LsHNsXfd/nV1yQoPk1OFPZHMB+U9iJGtCOqdPVIfLGkCtuakHyBg8qY3KelLWbAUdYlbsX1uHmrIPdJSEnuSjJUOPnCkH8yMxID4jO3PlIZ5vTQGFFvxTQMb2dWb/FGmW8GSpvDI4pN4i44O7l9sijl0p1FXfwcgG94Bl6E93v7GTw38I4xu2WVyOxjXL8d6M+tzGhDC0D/RA+JtILT/6MAp1Ie3pQM2HtE1QXFWhWMhfCHt2yJ+D9Nq/Uf7dXISEGLDZTA0B1cMU81KGuQcWR3OnqPJe1xVbzrgCGdE0rK4AvaEo0jVnn8ROWLfmwKOKu8SDW7mugw8RLHu3CHjN8yA3+Oe6g/qKt/NAjfzuIZhmTxFFww2C5H+iTtRKvmE65TXu67/zz6RCW0QPRDArmiOIekATcv33tuPnspIouHTVBNLNquz70xX0JQtmS1UAIoadocf3kEp5UdJGGGIZFXQSbzXypAlxgWe4sEpJIujiUlRkkxvO7AMhEAEgc4u6ERXU425YhzKVa13S2svuA54wxgn8mXSGCev2Jqdx26MVyskGJzXOV2XJNC2q939PqlS2/rDAVLxH6aixhO9smNGb2vaIyzXwmlK2IuEegnRF8n8RgXLuL1o/f4cOm/P5LQzO32q4EkDt8bHYQigIRUbPQFAAVrfEnz6qSVfPsru+7e0Bx3V62peud3HZFsc7tLjoSspAV5oLYUqwpCCPPHV5lCgMgbtelMOoubzRfnnfnIw94iI+SOgQ/YiZ7At3m7j35JIZYYoZMkq4JbN3WWojy4gzvLCmYMkpu0AyWM5tVU6iW3axcW0y5HyWYZrU8oPWZ11rNwviDMOFvlJfC5SraT264FbIGP4qXhNW3QI5cBAQiULYAwIWO+pjFrT+UrrIrHZI59BfpBExA+AGAXhsLEV6HXVCYahNzeS6enusb0KGj4zHIGSsNgDi8KEIKhoLWvDKN2WDh6jXOiUkOzw18UJQAfLkyW2htmSednks2Y0PlCmuAflmQezWrRaTlS612x2QHijGWoh9aDihFxNNs73Ck9n6Q722Inov6wvTQi3DpMcsjUQvd4+wnwGV5Kp3JgMTX+gqjIGRXlWcZbYQPIBi9EdrZOx0yMLBxrS9O21U6wdE0pXVKJrxfNvprEqrZTs2FLmCdhkkfaEGSmsY9dHCODyN9g/AtviZRicUTzzxuk/kWsFEc1aJR5zO5vy7QxtkNRNPax2oSJMJYxcz8b23/8UBcG 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)(1800799015)(376005)(366007);DIR:OUT;SFP:1101; X-MS-Exchange-AntiSpam-MessageData-ChunkCount: 1 X-MS-Exchange-AntiSpam-MessageData-0: LIg/uQLUtEsQmWItXVqxiCjE/HZbRTndHGrxJf+iQkPHdb6xuaoRvNICOXHpUIIp0osRE+Lpa1+EPzKnYlcEnMkcbtvcEY8H7FJu4qWivbKlL2MMYMV8bVCkhB5XeqHITXP2p7+ICTzIzxC81WvXtEqTrWNUxwBo+j1waDUB4Vg5p6+mGwn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rpLNtFpJ7Q= X-OriginatorOrg: oracle.com X-MS-Exchange-CrossTenant-Network-Message-Id: 93d3113e-246c-4ebd-3752-08dc84bda21d X-MS-Exchange-CrossTenant-AuthSource: CH0PR10MB5113.namprd10.prod.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Internal X-MS-Exchange-CrossTenant-OriginalArrivalTime: 04 Jun 2024 17:41:58.4517 (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: 2e/tUSeSe91+pI5CP5Uk9gX109exqPNIg3EjDQOlALS5TNGXhwBQUBWr0/PvHl7FoDsKqs5N0Ffkg/DowowSAPZ26CxJSPh6MRSrtaoXqMo= X-MS-Exchange-Transport-CrossTenantHeadersStamped: DS0PR10MB7269 X-Proofpoint-Virus-Version: vendor=baseguard engine=ICAP:2.0.293,Aquarius:18.0.1039,Hydra:6.0.680,FMLib:17.12.28.16 definitions=2024-06-04_09,2024-06-04_01,2024-05-17_01 X-Proofpoint-Spam-Details: rule=notspam policy=default score=0 mlxscore=0 bulkscore=0 spamscore=0 malwarescore=0 suspectscore=0 phishscore=0 mlxlogscore=999 adultscore=0 classifier=spam adjust=0 reason=mlx scancount=1 engine=8.12.0-2405010000 definitions=main-2406040142 X-Proofpoint-ORIG-GUID: shO83HU9eRyOQbTsTHd4u37qy0g0M-R7 X-Proofpoint-GUID: shO83HU9eRyOQbTsTHd4u37qy0g0M-R7 X-Rspam-User: X-Rspamd-Server: rspam02 X-Rspamd-Queue-Id: 9288418000E X-Stat-Signature: xq9i17dqgbs69szizoe9uatzdze851yx X-HE-Tag: 1717522936-370684 X-HE-Meta: U2FsdGVkX19/1JV9B3n/IyxKfNZG6dwDLCwkrDPfVf2yGf67GhJxYgmY+g5wePYwFRsaKmNlWmEM3z5cZa1xGxoiSWASrKI2WdC/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d3dqwOJrP1qzq1Q5TtjSgdyKPXbZcVqjEpX2g3csqBoJwhQhCQFNU+FVg40HLzm8ngtYUSaESKy8CSfCKq+/0cnfDUI+yEI0iPD6/5bdcY9TunWnFP/QqCzZviiXJ9kK1NfxiSi7zligDVz67xu+/hdQEpMaanmGOw1KQmM0fiH/5V2SbdLsE5Hh+BLZ6aZG+1opNwvAl/aFCyyHXKbRvx87BUw9pRquuRlT8f6cyfYfsEwo4juQhKavenqBAHB0+3YeVv+hXQeMc/ctbFwddCHf+V/WKEulACFQ== 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: Introduce a helper function, mas_wr_prealoc_setup(), that will set up a maple write state in order to start a walk of a maple tree. Signed-off-by: Sidhartha Kumar --- lib/maple_tree.c | 10 ++++++++-- 1 file changed, 8 insertions(+), 2 deletions(-) diff --git a/lib/maple_tree.c b/lib/maple_tree.c index 2d7d27e6ae3c..ccbec0f66562 100644 --- a/lib/maple_tree.c +++ b/lib/maple_tree.c @@ -5402,6 +5402,13 @@ static void mas_wr_store_setup(struct ma_wr_state *wr_mas) mas_reset(wr_mas->mas); } +static inline void mas_wr_prealloc_setup(struct ma_wr_state *wr_mas) +{ + struct ma_state *mas = wr_mas->mas; + + mas_wr_store_setup(wr_mas); + wr_mas->content = mas_start(mas); +} /* Interface */ /** @@ -5507,8 +5514,7 @@ int mas_preallocate(struct ma_state *mas, void *entry, gfp_t gfp) if (unlikely(!mas->index && mas->last == ULONG_MAX)) goto ask_now; - mas_wr_store_setup(&wr_mas); - wr_mas.content = mas_start(mas); + mas_wr_prealloc_setup(&wr_mas); /* Root expand */ if (unlikely(mas_is_none(mas) || mas_is_ptr(mas))) goto ask_now;