From patchwork Tue Jun 4 17:41:43 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Sid Kumar X-Patchwork-Id: 13685738 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 C3D31C27C52 for ; Tue, 4 Jun 2024 17:42:58 +0000 (UTC) Received: by kanga.kvack.org (Postfix) id A98DF6B00AD; Tue, 4 Jun 2024 13:42:43 -0400 (EDT) Received: by kanga.kvack.org (Postfix, from userid 40) id A21966B00AE; Tue, 4 Jun 2024 13:42:43 -0400 (EDT) X-Delivered-To: int-list-linux-mm@kvack.org Received: by kanga.kvack.org (Postfix, from userid 63042) id 78B4C6B00AF; Tue, 4 Jun 2024 13:42:43 -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 511DD6B00AD for ; Tue, 4 Jun 2024 13:42:43 -0400 (EDT) Received: from smtpin25.hostedemail.com (a10.router.float.18 [10.200.18.1]) by unirelay06.hostedemail.com (Postfix) with ESMTP id 1420DA2258 for ; Tue, 4 Jun 2024 17:42:43 +0000 (UTC) X-FDA: 82193926206.25.20C8396 Received: from mx0b-00069f02.pphosted.com (mx0b-00069f02.pphosted.com [205.220.177.32]) by imf13.hostedemail.com (Postfix) with ESMTP id CFF5020011 for ; Tue, 4 Jun 2024 17:42:39 +0000 (UTC) Authentication-Results: imf13.hostedemail.com; dkim=pass header.d=oracle.com header.s=corp-2023-11-20 header.b=SuSDeCT6; dkim=pass header.d=oracle.onmicrosoft.com header.s=selector2-oracle-onmicrosoft-com header.b=RBMDmi1K; dmarc=pass (policy=quarantine) header.from=oracle.com; spf=pass (imf13.hostedemail.com: domain of sidhartha.kumar@oracle.com designates 205.220.177.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=1717522959; 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=0uxtuNjYvHMIW8wAN+0vAK8V7rBgN5K87NjJME5JiWY=; b=bKiUCmY3U4MDJjbTl2qKhqbkKcfUiU7m6Q99rRZsRlLeH2MmogNwBDoLxnVWx/JgvO4Hmw 9NrmMHLF8AEDjvEI7JFJzm5WWwiSCrCOihGKVb7sWHdjBWT3h8fSZOFemYXAXDNoacxWCa Kw++90wwWMnp1q/Omjog5aDvhdz5xtM= ARC-Authentication-Results: i=2; imf13.hostedemail.com; dkim=pass header.d=oracle.com header.s=corp-2023-11-20 header.b=SuSDeCT6; dkim=pass header.d=oracle.onmicrosoft.com header.s=selector2-oracle-onmicrosoft-com header.b=RBMDmi1K; dmarc=pass (policy=quarantine) header.from=oracle.com; spf=pass (imf13.hostedemail.com: domain of sidhartha.kumar@oracle.com designates 205.220.177.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=1717522959; a=rsa-sha256; cv=pass; b=rnAP+Z7pydQA7xymRRRZZ7dWm0KTHwQ+kcp0rW1YKuOFrNWxkVyVm7kKESjydoPtuLGe81 EAPMNqilBf6Of4rVWilFJUMGjPY2K83F8W3ON8KqRpq4oMafn0niC3VRLGTiN137VFH5Pw pr4iyJQpS+e0PPeeJP2T3siXP+9sKpY= Received: from pps.filterd (m0246632.ppops.net [127.0.0.1]) by mx0b-00069f02.pphosted.com (8.17.1.19/8.17.1.19) with ESMTP id 454Bn0BI032321; Tue, 4 Jun 2024 17:42:29 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=3D0uxtuNjYvH?= =?utf-8?q?MIW8wAN+0vAK8V7rBgN5K87NjJME5JiWY=3D=3B_b=3DSuSDeCT6k4JxTRnAh7YZG?= =?utf-8?q?19ZY5u98xhIPhe392kcyRogcz8oNHCgGZTO783MzGzNPPc3_x7UsMe42V5rgvdOxk?= =?utf-8?q?ZLrRFtJxFr5LNEmKIJtS9fPjYz0yqsoNqyS8nbpwg2au6Yyw5Be_gfkD7uavK52wc?= =?utf-8?q?ip5wzZi6gf0SSUANVNGeeC547lKTHE67tghoqy0BRmiRPalkAO3X8LY_LB2zyPnaM?= =?utf-8?q?7jsxz+2YOohXAAVzrVUSkRJa7l9Ws8ZKzAUhDW0vdXP/KfPQFo1JDYw//Eq_LDs8M?= =?utf-8?q?3225KMU35pTwJFSlDJQchP8QdnXvLtYQ1Xfqxpu10BN7U0sDJ/hleF2FIUb5P2n_9?= =?utf-8?q?Q=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 3yfuyu5j6x-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=OK); Tue, 04 Jun 2024 17:42:29 +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 454HVuMC016217; Tue, 4 Jun 2024 17:42:29 GMT Received: from nam10-mw2-obe.outbound.protection.outlook.com (mail-mw2nam10lp2040.outbound.protection.outlook.com [104.47.55.40]) by iadpaimrmta01.imrmtpd1.prodappiadaev1.oraclevcn.com (PPS) with ESMTPS id 3ygrsaf3bu-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=OK); Tue, 04 Jun 2024 17:42:29 +0000 ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=ejQ1k1KIl0LvQ+vGg/OA3JREpbN2oLRHEOoG/BnPnOypYA7XUd8dpoyFAPi1nwSkOqU6wiAET27LP8SNAW/Z7By5vNqxn8sH9T5Xc8lMikCD7kD5lyEs89122qVwC/tcLdfZoDscx+TYUxlF6I5ryA6K9VTBhAOBjgMJDzQuy0PY9S9qaCStYs4mKS0JEZ6GShRJjMy1jPOCzWtFtjXfwyFchcFjeX2dBi1iFMIq9WueFDK0oXsvyu0TqdznA+rDJFnusH1cRAHr8pqjgD70XusuY/jpAPu7cmIfiqhGS2ZJvbSwM5hJZJEe5nhW7WciyjB4QhWJ1cM/cX+NxbcWIw== 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=0uxtuNjYvHMIW8wAN+0vAK8V7rBgN5K87NjJME5JiWY=; b=UyPFarxfD+BvOcB4iJNjRYJY3CPDjq3nGgXzhC3GoBeYN2CheeKSWHnWEsfNuqN26z2NEzlcZD4mpLIwzRpby926xkF8BpiavEPCM/SAwRj96vTF1yl4njytn247vH8un027suvv+IQ1FFmOhmi+LQYx803ewGFRZG7FM8YgOJubMouYva0bYHrsMf2Szbm1PLeVGaADkVPZyslTYqfRVL0MHNnZV7ZvxyDs3qmedIMneoLzl36ud0YYgPGqbK1fQSpNbbbZynvvii8MjPSzJS5kqb41PMC3/qgDfC6ia8Ru8UjeHTktPFWW+L+IMDpkyAhQ0xQ2DZB6QIEJqsXtKg== 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=0uxtuNjYvHMIW8wAN+0vAK8V7rBgN5K87NjJME5JiWY=; b=RBMDmi1KrKtLwLolYilKgkciEsUNgQ9D2lwqGJDkbfCtN0se22yha9+nm05qx2kxmx2g7bcWk6mMmnbOEiC3hoj8X3CeCC/8gUIY2rH3i6qIQM1sWs4P+Xdn/ADycbz1hjCRbIQMvvZEElkh9K+JzNOQ5JmoirZ/v3kYayCoSiU= Received: from CH0PR10MB5113.namprd10.prod.outlook.com (2603:10b6:610:c9::8) by PH0PR10MB5893.namprd10.prod.outlook.com (2603:10b6:510:149::11) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.7633.17; Tue, 4 Jun 2024 17:42:26 +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:42:26 +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 16/18] maple_tree: remove node allocations from various write helper functions Date: Tue, 4 Jun 2024 10:41:43 -0700 Message-ID: <20240604174145.563900-17-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: SJ0PR13CA0144.namprd13.prod.outlook.com (2603:10b6:a03:2c6::29) To CH0PR10MB5113.namprd10.prod.outlook.com (2603:10b6:610:c9::8) MIME-Version: 1.0 X-MS-PublicTrafficType: Email X-MS-TrafficTypeDiagnostic: CH0PR10MB5113:EE_|PH0PR10MB5893:EE_ X-MS-Office365-Filtering-Correlation-Id: 8488f0fc-f35a-4911-06f9-08dc84bdb2aa X-MS-Exchange-SenderADCheck: 1 X-MS-Exchange-AntiSpam-Relay: 0 X-Microsoft-Antispam: BCL:0;ARA:13230031|376005|366007|1800799015; X-Microsoft-Antispam-Message-Info: oK/OcY0NJ6d5ujnBIVNTzNIo22tuS5FIWAIZLJZwMqj7lIuuINspIl4nDzV8MLQlL6ueBpb1okEa3sUSuXy19uCJJQtJprXjv0QuErIshbGq6mMbwQiEeVJL8S+nXZ7XPMWWj1K8UkMjvDlgzNnzO4rME2cHffEjaPw1cM6zfKkTaIbQc0gTRfn9i2hry4DCaH3yeGKyLtsxdu4wu8ClRxEk11mXHYNjufUEQzNPrFGdTRR6RlDq36I4IzGCDd8vNzPtIq/s6aE4uxBrIRYmN3pmNaNY3mDJbeaQzqxuXIe7BJpND6quU+b5Rvnbvp6jaPK+6lKuCusxIPMQiEo8kl3wPyWxhI1CJPRQy/EZBHZLaOun7SCbCV3xxBgiJlPdNiuYwtfOWFdiZauksH4ApLswgyu79IFiD54TgPdFcW0f+qedbCqwu8LUKQG2rqbN24v/MXG1EgPetc5hB+a4N3b/6mpYbQdeRLPGTAjFMyMEoZQqRps8+hMOkIWAk+L0GSZGwUZ+YfCksjy8tJ4Eup2wHwz4sWq6m+jLcbQCq+hYIP4i79WQ8mf+xxz/bVicjA0nj0KGDyoP5KueYFI27ms8lBFnCGEbakgrG5Rbfn4x31ax2Zgney5QN+6oayc6n1Bnoa2kSWpTli/FT6jfSSEG4FV/f1W+rE5LYuIXh3TjqgfMoTAo6uQTSWFFFzAW1xWbdGEhZz2OaGDPit1RIUCLrBCqfjXWIpqmhErzKwJgWAtC1bVyydP4BxrcpR4mOHUVZCjACMfJHESKkn++iodtAv7Bu55G9attLD0yy/rjLitdabQlFzDjNhKfxMJAIC8Gik/camV9DcBuoIMPA1R5EpV5slKfa/AoqkToOMqJSIHEzN4ex6ao0nPjrPSCsPHrzWvwDgqB0Z9LKDQAPVO0x9OB9IyP5XYV6deHetd284yLk/WPW87OSPUIkLEo7UMqfPX1hE3J+QEKv9K7PwbuBiK4nznfeAH+hAbDmleKTAXQPZqgbwR1sN677eEjnfRIxv2fEuYMMAyXTq4tYiOkAmD7HAEM/bI8bKETOkai8FAuyD2oNJO+IHAyae+rmi2dGvqHYepkXNheoEf0Oz20fFAiVr6Fe5EyxLlcILvVX/fMwSsfBL0aiOaSQtSkZnb/1bKmpXREBD6+OR6j3BtuzUKuTbd8wRC98nNaJlxHBCZycJHmiHEk0erbEmzogm+Oxl5z35Tr2CI/mvYAYfg6n+yoF7n7JxCxKrkFtNq1WL+Thqm8gMmz4AtO5GwpVA5xhpGGc7/zDv+j50lyF5NBJ2OmE4l4cJUakAm98ncEEfzjPBJ/A/5OjQEYFJgG 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)(376005)(366007)(1800799015);DIR:OUT;SFP:1101; X-MS-Exchange-AntiSpam-MessageData-ChunkCount: 1 X-MS-Exchange-AntiSpam-MessageData-0: BXcOFhxRzYF5/v1cbW0Kp9kHw9VvjKp4zwSPLwnAZdXMB8YCivdIFluCKX63aTGEDWSPjctkWm3HB9rurfmRRQ4OY91zkRIUa8WuALX/4ajkWEIimz2OAfxTgJJ2e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au6YQENOgyGZGE3iunyC6mvBSFlocRePMKjN3o45DWQ= X-OriginatorOrg: oracle.com X-MS-Exchange-CrossTenant-Network-Message-Id: 8488f0fc-f35a-4911-06f9-08dc84bdb2aa 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:42:26.2483 (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: VEoo2PFgHYUssV8ayh73BYLJ0CA60xpLE1OGAtK1AV2WjyAD/YBbE8iiKBfoGcHX+s/Vkau1pBLxdGxO71Z36c6JXol/dyqLz/o5TSUkSyU= X-MS-Exchange-Transport-CrossTenantHeadersStamped: PH0PR10MB5893 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-GUID: mfb-EawXCMblJdKVNmvf0rl_1vmYtDiL X-Proofpoint-ORIG-GUID: mfb-EawXCMblJdKVNmvf0rl_1vmYtDiL X-Rspamd-Queue-Id: CFF5020011 X-Stat-Signature: dibntko4xj8wxnd1q7in1e83otao8agj X-Rspam-User: X-Rspamd-Server: rspam04 X-HE-Tag: 1717522959-101747 X-HE-Meta: U2FsdGVkX1+hQPctpQl6FhAYmJe5ALav9dWN2SwCoqO9fGUK7n+D/rN7gKyys0SO4PSIR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H8EjEuGnph0bzUsOm4mjq8Op0pxMtxRxUyx/sJnPtkPsUWTpL0I+frWo1mQf/XTTuMAA9oCY1KaqRmEbV4Bxv1nlNFUL/wGW6DjJRXxch4+6jD2tKhByUbVKKsliVfnLfW4QdMXubVhRamFQLAbqca2ddeii3HK9gBkO0Otb0eX1QRM+TyhlPrbn1LUxEzLb/HVI5Aic2SWtp837hOZ6eAJiIaYwpJlbrgieAs/GDfmnavO68118lw8oeT/0vH39HGBjVkc0qdP/Ioz/+Rbz8l7jn2xdtmpQIdjigDpq111un4BZNwRzDHaCNCrrpl0oE0q/4Cxvp7OkA== 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: These write helper functions are all called from store paths which preallocate enough nodes that will be needed for the write. There is no more need to allocate within the functions themselves. Signed-off-by: Sidhartha Kumar --- lib/maple_tree.c | 31 ------------------------------- 1 file changed, 31 deletions(-) diff --git a/lib/maple_tree.c b/lib/maple_tree.c index 42853afc3885..3d2d8c2c24df 100644 --- a/lib/maple_tree.c +++ b/lib/maple_tree.c @@ -2976,9 +2976,6 @@ static inline int mas_rebalance(struct ma_state *mas, * tries to combine the data in the same way. If one node contains the * entire range of the tree, then that node is used as a new root node. */ - mas_node_count(mas, empty_count * 2 - 1); - if (mas_is_err(mas)) - return 0; mast.orig_l = &l_mas; mast.orig_r = &r_mas; @@ -3029,11 +3026,6 @@ static inline void mas_destroy_rebalance(struct ma_state *mas, unsigned char end /* set up node. */ if (in_rcu) { - /* Allocate for both left and right as well as parent. */ - mas_node_count(mas, 3); - if (mas_is_err(mas)) - return; - newnode = mas_pop_node(mas); } else { newnode = &reuse; @@ -3341,10 +3333,6 @@ static int mas_split(struct ma_state *mas, struct maple_big_node *b_node) trace_ma_op(__func__, mas); mas->depth = mas_mt_height(mas); - /* Allocation failures will happen early. */ - mas_node_count(mas, 1 + mas->depth * 2); - if (mas_is_err(mas)) - return 0; mast.l = &l_mas; mast.r = &r_mas; @@ -3446,10 +3434,6 @@ static noinline_for_kasan int mas_commit_b_node(struct ma_wr_state *wr_mas, if (mas_reuse_node(wr_mas, b_node, end)) goto reuse_node; - mas_node_count(wr_mas->mas, 1); - if (mas_is_err(wr_mas->mas)) - return 0; - node = mas_pop_node(wr_mas->mas); node->parent = mas_mn(wr_mas->mas)->parent; wr_mas->mas->node = mt_mk_node(node, b_type); @@ -3475,10 +3459,6 @@ static inline int mas_root_expand(struct ma_state *mas, void *entry) unsigned long *pivots; int slot = 0; - mas_node_count(mas, 1); - if (unlikely(mas_is_err(mas))) - return 0; - node = mas_pop_node(mas); pivots = ma_pivots(node, type); slots = ma_slots(node, type); @@ -3747,10 +3727,6 @@ static inline int mas_new_root(struct ma_state *mas, void *entry) goto done; } - mas_node_count(mas, 1); - if (mas_is_err(mas)) - return 0; - node = mas_pop_node(mas); pivots = ma_pivots(node, type); slots = ma_slots(node, type); @@ -3813,9 +3789,6 @@ static inline int mas_wr_spanning_store(struct ma_wr_state *wr_mas) * entries per level plus a new root. */ height = mas_mt_height(mas); - mas_node_count(mas, 1 + height * 3); - if (mas_is_err(mas)) - return 0; /* * Set up right side. Need to get to the next offset after the spanning @@ -3899,10 +3872,6 @@ static inline bool mas_wr_node_store(struct ma_wr_state *wr_mas, /* set up node. */ if (in_rcu) { - mas_node_count(mas, 1); - if (mas_is_err(mas)) - return false; - newnode = mas_pop_node(mas); } else { memset(&reuse, 0, sizeof(struct maple_node));