Message ID | 20230612203953.2093911-9-Liam.Howlett@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 509D4C7EE43 for <linux-mm@archiver.kernel.org>; Mon, 12 Jun 2023 20:40:39 +0000 (UTC) Received: by kanga.kvack.org (Postfix) id DC0B58E0008; Mon, 12 Jun 2023 16:40:38 -0400 (EDT) Received: by kanga.kvack.org (Postfix, from userid 40) id D97528E0003; Mon, 12 Jun 2023 16:40:38 -0400 (EDT) X-Delivered-To: int-list-linux-mm@kvack.org Received: by kanga.kvack.org (Postfix, from userid 63042) id BE9BA8E0008; Mon, 12 Jun 2023 16:40:38 -0400 (EDT) X-Delivered-To: linux-mm@kvack.org Received: from relay.hostedemail.com (smtprelay0011.hostedemail.com [216.40.44.11]) by kanga.kvack.org (Postfix) with ESMTP id AEFEA8E0003 for <linux-mm@kvack.org>; Mon, 12 Jun 2023 16:40:38 -0400 (EDT) Received: from smtpin26.hostedemail.com (a10.router.float.18 [10.200.18.1]) by unirelay03.hostedemail.com (Postfix) with ESMTP id 38FCDA0304 for <linux-mm@kvack.org>; Mon, 12 Jun 2023 20:40:38 +0000 (UTC) X-FDA: 80895264156.26.F301A1E Received: from mx0a-00069f02.pphosted.com (mx0a-00069f02.pphosted.com [205.220.165.32]) by imf04.hostedemail.com (Postfix) with ESMTP id D145D40010 for <linux-mm@kvack.org>; Mon, 12 Jun 2023 20:40:34 +0000 (UTC) Authentication-Results: imf04.hostedemail.com; dkim=pass header.d=oracle.com header.s=corp-2023-03-30 header.b=MTYsbnLQ; dkim=pass header.d=oracle.onmicrosoft.com header.s=selector2-oracle-onmicrosoft-com header.b=jXrGt2b+; dmarc=pass (policy=none) header.from=oracle.com; arc=pass ("microsoft.com:s=arcselector9901:i=1"); spf=pass (imf04.hostedemail.com: domain of liam.howlett@oracle.com designates 205.220.165.32 as permitted sender) smtp.mailfrom=liam.howlett@oracle.com ARC-Message-Signature: i=2; a=rsa-sha256; c=relaxed/relaxed; d=hostedemail.com; s=arc-20220608; t=1686602435; 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=NHXrvplhxn0Psdt+SxrHMdYn2tB3EVdr75v/Rv24Kts=; b=vWhIQMj9HZl0sSxJ90qpAbOHteJrlgTV3NMFHFj7deC7kwDkI2gsna1O4h+1H2HZSvoe7B I1zhMW/gCmsDeEWs6eRfN7kXEoZsRUzB06IiV184SdkWfIKwLu2zOz6o2XocM56ajA1C+F cXz+QD25c2liyHOYHaacxP96tVwbz90= ARC-Authentication-Results: i=2; imf04.hostedemail.com; dkim=pass header.d=oracle.com header.s=corp-2023-03-30 header.b=MTYsbnLQ; dkim=pass header.d=oracle.onmicrosoft.com header.s=selector2-oracle-onmicrosoft-com header.b=jXrGt2b+; dmarc=pass (policy=none) header.from=oracle.com; arc=pass ("microsoft.com:s=arcselector9901:i=1"); spf=pass (imf04.hostedemail.com: domain of liam.howlett@oracle.com designates 205.220.165.32 as permitted sender) smtp.mailfrom=liam.howlett@oracle.com ARC-Seal: i=2; s=arc-20220608; d=hostedemail.com; t=1686602435; a=rsa-sha256; cv=pass; b=AuGhAWeK8VQOQVfeE//gdmGY+rqvaOZrppCxoKMvqSuivcxH8M2HlXdN/V9tmlZKuy0h6T dyjdWiteiGoQeLnaG3BYqhPm9cKkS4SoBx3xZ5mqyLkhiEIB6RE8CyuT5fstBKQO24IncL evPmUQYwVd49tW+eJfYwrFf3EKnpaSM= 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 35CKO4xs029655; Mon, 12 Jun 2023 20:40:25 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-2023-03-30; bh=NHXrvplhxn0Psdt+SxrHMdYn2tB3EVdr75v/Rv24Kts=; b=MTYsbnLQTHG3B1ZBJh1Vnbxesj8PTLlLZa3VFq2m8BnRj8B94gPqYSGcme9HIUovnwzC 5fKEwvTpBpb1BoL3N8Uk/37z/aPM3wSx6stMcAvXsPkDoFeaxnBB7ROEiL5y+cNB/Cyv CsP5bWMNLvEWYoIOu+KE8qOnh2eYmgbT74IX+hv8qE07pS8YCdkQuwBzISqbyhcgIyCB el3McO/pSL77Ikx9D4OLRz2P0jBdx+KPiGOaLNodvvcsWTJG5gxBtwtwvj6hN4vAlT5U ndApqiUlKLVx9bmx1NxVWp5f2dyStAqUVxTkpbkcUGo348mYItR6kfvqSQS8WT7Phs3Y 2g== Received: from phxpaimrmta02.imrmtpd1.prodappphxaev1.oraclevcn.com (phxpaimrmta02.appoci.oracle.com [147.154.114.232]) by mx0b-00069f02.pphosted.com (PPS) with ESMTPS id 3r4h2akv47-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=OK); Mon, 12 Jun 2023 20:40:25 +0000 Received: from pps.filterd (phxpaimrmta02.imrmtpd1.prodappphxaev1.oraclevcn.com [127.0.0.1]) by phxpaimrmta02.imrmtpd1.prodappphxaev1.oraclevcn.com (8.17.1.19/8.17.1.19) with ESMTP id 35CJd8Ku014064; Mon, 12 Jun 2023 20:40:25 GMT Received: from nam02-bn1-obe.outbound.protection.outlook.com (mail-bn1nam02lp2047.outbound.protection.outlook.com [104.47.51.47]) by phxpaimrmta02.imrmtpd1.prodappphxaev1.oraclevcn.com (PPS) with ESMTPS id 3r4fm31597-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=OK); Mon, 12 Jun 2023 20:40:24 +0000 ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=WeCKY+tvXV7mKyT+zr5vHSyaEgofR8qDl+ew3w4GwF1qvXvh0+k2P9yzF226lCEUeqEEyikMi47ZEBHThbJmu+Reu+dPLJYIVqJbIOqKSsVsDiIVA+ub2mu2qiSzjgX2Hp4Rdq7hV2KLOBLFmZmKEgMgvjMK/VFezf/SrCy//xooCreT2x62zDhjf9G/a72kjP4KYmZUTTNr0lZNzkDIJNisFfYhatvMcoIGhgGBi8N7viAu0onjOnjZFODibQOyHeSaDXb7LVYsW9pgMRqXB78nm3+MQ/oenhGKYURkf5UKhOUSWJAlywbFqRgU4xvTSpkkkpV9cLFTGiAdsYK7kw== 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=NHXrvplhxn0Psdt+SxrHMdYn2tB3EVdr75v/Rv24Kts=; b=h+yBukN/LuIo173e4U7A/q9dGExBNKR6ZF1Ln9bjpC3QB2LejKLmOWTvLAGfMvdrKLulqbcKjRbd5qrgkEITtJUJUYB+WLVUmqnsMn+P4TIjEZXaV70MReB7D0c5tS6VPJb2pZr2MozIlLz5J5XNLrTmuF3xQoeqsqkzDd8SBg9Sil/Jxr6bsoQ43vw8/+WE/p/Su0sNoQs7P+IkZAj0tTHeqcg3eJJ7mC9n9AsGZ6PnyvCCx3D+8UbDdQc6yoJmF5+fI/uNywDYZ4vh7fhu0JEheOUBhbrc5GH9A4xp2cQ12/hMvvd9P47BcptXFT6wMwE0F0vI+Pa0GFeyDuL6Fw== 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=NHXrvplhxn0Psdt+SxrHMdYn2tB3EVdr75v/Rv24Kts=; b=jXrGt2b+y24Rtba3QF6+dStV8krEpn2d17YXcexs6VwN5dyBNhBAIZn8gnMCMFnpgkLPuPbQ/qg/Ys/gHrBJKhLGKGZCu1laOLBwxUqdP8VmJDomAV8ckG2v6Rh3JsBtCMhAYfz+gh7piIWiuxSLXphCXL5coVVEtDPgJBXsNVY= Received: from SN6PR10MB3022.namprd10.prod.outlook.com (2603:10b6:805:d8::25) by SA1PR10MB5868.namprd10.prod.outlook.com (2603:10b6:806:22b::18) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.6455.44; Mon, 12 Jun 2023 20:40:19 +0000 Received: from SN6PR10MB3022.namprd10.prod.outlook.com ([fe80::998f:d221:5fb6:c67d]) by SN6PR10MB3022.namprd10.prod.outlook.com ([fe80::998f:d221:5fb6:c67d%7]) with mapi id 15.20.6455.045; Mon, 12 Jun 2023 20:40:19 +0000 From: "Liam R. Howlett" <Liam.Howlett@oracle.com> To: Andrew Morton <akpm@linux-foundation.org> Cc: maple-tree@lists.infradead.org, linux-mm@kvack.org, linux-kernel@vger.kernel.org, Peng Zhang <zhangpeng.00@bytedance.com>, "Liam R. Howlett" <Liam.Howlett@oracle.com> Subject: [PATCH v2 08/16] maple_tree: Adjust node allocation on mas_rebalance() Date: Mon, 12 Jun 2023 16:39:45 -0400 Message-Id: <20230612203953.2093911-9-Liam.Howlett@oracle.com> X-Mailer: git-send-email 2.39.2 In-Reply-To: <20230612203953.2093911-1-Liam.Howlett@oracle.com> References: <20230612203953.2093911-1-Liam.Howlett@oracle.com> Content-Transfer-Encoding: 8bit Content-Type: text/plain X-ClientProxiedBy: YT1P288CA0022.CANP288.PROD.OUTLOOK.COM (2603:10b6:b01::35) To SN6PR10MB3022.namprd10.prod.outlook.com (2603:10b6:805:d8::25) MIME-Version: 1.0 X-MS-PublicTrafficType: Email X-MS-TrafficTypeDiagnostic: SN6PR10MB3022:EE_|SA1PR10MB5868:EE_ X-MS-Office365-Filtering-Correlation-Id: e008042f-87b0-4306-a25f-08db6b853cbb X-MS-Exchange-SenderADCheck: 1 X-MS-Exchange-AntiSpam-Relay: 0 X-Microsoft-Antispam: BCL:0; X-Microsoft-Antispam-Message-Info: iPNPgv0xdySK9nUTM2NSmF/o5nEeE0G+SwuTw8CkzuKVP0huwylxAb5KKTMRNrH4Aus/P5wIW4RW+y6KpuPOjuLP44NPqNzlVnIUW2CcZh7J08xxtVOTEYbdwHwpAcSuz4dQnAnWziPWI8gDoQOrldiX01PWXpzq3QecwpxmucW53l9qnokVkJ6DLSVxV1OQAhwCAPqKtdZsSCua7LMpI4xljF+Sra0LNqf7xz/tN/9Y28ASCq1QeZwtMFCHxr/SgvJbgS8UQQ/hs6QwL5dB90Y0h8+DfNKsxBX+tSEvD8XY+MF8ZPAXUpdnHW5Px97W62fq64MODe6TWuCnqNB8m4E0nSkt37Bd8EbtSO/g5HLybLaqllDv4FjPbX/Y4hBS3Jt65E2IUKPz+8x5PhGJqwsHkRvk9XcxelCJX10aHa4qvAz24/I//6STcGOrTBdVU1eTZ19jCCFvFhV0Yu8xhNhvbgTLxSfmIBwY+0hRTy4ISR+MG6Zyj4vNoXQxDttggU3U3pUS9vmgwf1s3iN/+ztgrljnHAOffHNcNrM6QqDuLb8S2Tg4lX/Dz1zYNu+t X-Forefront-Antispam-Report: CIP:255.255.255.255;CTRY:;LANG:en;SCL:1;SRV:;IPV:NLI;SFV:NSPM;H:SN6PR10MB3022.namprd10.prod.outlook.com;PTR:;CAT:NONE;SFS:(13230028)(366004)(346002)(39860400002)(136003)(396003)(376002)(451199021)(8936002)(8676002)(5660300002)(4326008)(6916009)(66946007)(66476007)(66556008)(316002)(54906003)(2906002)(41300700001)(4744005)(6666004)(478600001)(6486002)(6506007)(26005)(1076003)(107886003)(6512007)(83380400001)(186003)(36756003)(2616005)(86362001)(38100700002);DIR:OUT;SFP:1101; X-MS-Exchange-AntiSpam-MessageData-ChunkCount: 1 X-MS-Exchange-AntiSpam-MessageData-0: XWvSRhor7AQa9JMh4Max+JDrbO8Wj16ciljHUWr7kk5CMStDoTD2k63bgXZ4hZ+Prnq7Fa7w0dtxA/tm78nDowciqSgFuXoigXjrcLwloAud++sfJZosc9N0x8S5iREbcpAIex0GP4btu1rnPTPtwmVE0lTykgetFWoV9rNzss21RMmYKdcyMkP8NhelEy9OvLr30PaZGfPlDLib1KaTrNdxqnKEh/DhYH3OlTjSfkrpr8A0E6aAwHpqaRJXDuf4VaXYqYJ7sgzxRfROw/a6rMv5LlPKgr7OnbwO9vqIyvNhIlTZAd0xVBRczUg+EZkd4FADRegp2w2vMpHQZS+WF3zcuWSRn6RbbjXv64v/jGJEwIWUdba6J5R7SyAGc9xs1OmPNiug0wyp7+GuzOBx/Ii7sNZLh/Qbj2rpPsyNibiN007HRKlx/zhuHDn1JUBZH2aiO6uBycrosJrPKhrs8SjRu/99ivq4AwNfX+DsEkQgNeVGEfQJWGcNDekqXTQCHGIUVDuOLJ7fBtOU1bXUidepAbSQXgcu3ShqLFD6+m8PQkDLzh9EIQQ42GS4hRv/z7q5wN5lfbKB47gn4yAy4lNhR4AO70gU4qlLk6RZGDJxhOwrQiPfB0QLGYjHDUDXSLDDpH0coEX4E19ht+c9LQAo+wWUBhYANIrBjmTYz4hRcxmxQCJwILUAHMacbeeiDrbVUGulNpbJScKT7CqbBhrZBrYv+0bKe4T2tDE2Zh/WFIgaDzsTwaHlI+HFNGqoiATTD5pkgx62O6q5/o8lxjtzOpRK3MN2+kmXW28Hw+XVxiW6iAuh6pSpQCi44akTuSLDraZzDFXSlluKYuHp9UROqTXf6ULbp30bvHgCXx26NlIz4yryrV7nAY75Jx2vIWmJHQpyGhZF5REEevAr0blwSXhgWTHUp8V+H+KONefcWLt6GjzZssZaZLFlW8BmW5qyZeTWwRuy3hIF1VHFvRA7ei2VxhwC1NuYDRnwr2FwFDDOczLGtnyQMh7CqzN1YWCg2vzFBrtsGBQZdBLPdzpNZEb2QOS5BbhbQvGpV3GCsNpbh0pAKcH7N66Qeoc9wpOFrXDF3rpxquET9zGxnJHrCW57m6XmGgcDl48T7dRgQ2OA8wwFjQe3/F5Cfj8qX3X73u7PiJl+LrNkzurWGKcIgvKmm4mFSq3cIcOoD3OZcuUx9mUIycQw3a6TiL98Ioe39tvPMak9fHSSPCm7jbw108ptd8oqC8S/LgtKto0HvU+smgqYK6Jm9JSrxvnUY8HYMxnndaAbuaFriVzeotmxlXCJkMIXlkZsw8m9DdRXjgTGMgfc7JAwkNggOJYQTb0EJXue0e6nCcYHdMv1v4PI0T7jptdmpwVgAPcQwZVALNF6AtohyWNUuoecXWE58kPueSa8usyeGiltEFJcGQcz3IJ/rY9Ek27NZ+5sUlBisvPY59EI35+U6rPL6B365wCvmDODPfibhKnshRWALnm2F0Hsa9yK3Yl9bEjohWV2eTFDR2W5kkmZsXf0V+66tDE/fKpHj64iBFRdhvzPYSgoFC3+Z+/3t79xubtzR3BqR5RL3FQoTPH02OhEiBy87x+nxwvGvBD3IRQUA0/luQ== X-MS-Exchange-AntiSpam-ExternalHop-MessageData-ChunkCount: 1 X-MS-Exchange-AntiSpam-ExternalHop-MessageData-0: dR9jozdjuPvNRFS5X8/6aRy9Bhp72XzS+lZKzdY7VRnP7UMNhBDPf5OoYr0NOaJ8ptCU7e+M4HPVpTIFlgQnpH4cYKmKFGkXxX3hMgPK75azpi69wfk8dOFpEK64lwq9ImiUpV2zk2AxbgQL2MtWk5RfOt+kds61FBi9QKBTtVVrjsD8DwDYP+fyP7ZNcfXRuANvk9MUdedDRDnzFEfxYlclH1gDxDVJsyriz1yOJl9zFLgAglGH7NtFZ8GMw5Z7PKGOel76fZq0dtErXvD2kTYWkNrXNfAfOHje6WdpzjpM4Fy42dbYIhArvpbXlSkdJLi/okOUwL9ov6rG/1RNMjVssgZ361R8Or8RURhT2+bOWGmGQJH34flwVmHBPZqbK8b3ztS6mcLclI5Le+ODAxHLrk9//hRRvXJItVUq5LR+dzlj1yjIuRz5LtntJe0o+jDBymu77QMRYx9CNt0c4AeFUvRnyVkwuMlmrv5H7x2Q42Z8L20jmpF+ictDOiTw7l/X+7+qbxVl1IihhAV8ef031kVzm/zNsqajyWDI9vwKDus4xeli/D1DCHnpwseUxPjIp6sZt3sHxDR7sNlxu7XPY9yBOFqs2+eXW5W2NJ7gJJy8swXWOLNRfOaam4yPkihRGzDPi6quj1bQltsvH1pTBdKpsgFYG372Ra+K473eBwTzSplSQqrWXx58e0muanSUKHk5gHLeDT3hZQ7W+ybi98iICW+bdGXe9DAHSr0otGfBxNVBOjKXmmGvQWH0zT5SqUHkm2nse+VaP1sw9lxhAnO3O7sYvDndScTuzIzBEgeyloM0A68BpMjvGhxbSdH7s7zDmCpPmZKeX64v85lKjgX98I6dCDes09ZluMsJuPhXNCx6m9zuD/7eI2fM/a48ESitnTCNOTHujQ/ELSPDr8SXkP3H9tqvuO4HzqJGjFP4RwOfwYMde3ajano9 X-OriginatorOrg: oracle.com X-MS-Exchange-CrossTenant-Network-Message-Id: e008042f-87b0-4306-a25f-08db6b853cbb X-MS-Exchange-CrossTenant-AuthSource: SN6PR10MB3022.namprd10.prod.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Internal X-MS-Exchange-CrossTenant-OriginalArrivalTime: 12 Jun 2023 20:40:19.7620 (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: pjGx1C7VPhciuCMNfUsQjVTUv6XMx/efITCxS6d/wyAqG67SxtJjpf6vEKt3yxHcF6ToOmyjNzmyut6N6YlzUg== X-MS-Exchange-Transport-CrossTenantHeadersStamped: SA1PR10MB5868 X-Proofpoint-Virus-Version: vendor=baseguard engine=ICAP:2.0.254,Aquarius:18.0.957,Hydra:6.0.573,FMLib:17.11.176.26 definitions=2023-06-12_15,2023-06-12_02,2023-05-22_02 X-Proofpoint-Spam-Details: rule=notspam policy=default score=0 malwarescore=0 suspectscore=0 mlxscore=0 adultscore=0 spamscore=0 phishscore=0 bulkscore=0 mlxlogscore=999 classifier=spam adjust=0 reason=mlx scancount=1 engine=8.12.0-2305260000 definitions=main-2306120176 X-Proofpoint-ORIG-GUID: S0vO_-NYP_drEBiC1puPCk0BtsjcqveT X-Proofpoint-GUID: S0vO_-NYP_drEBiC1puPCk0BtsjcqveT X-Rspam-User: X-Rspamd-Server: rspam12 X-Rspamd-Queue-Id: D145D40010 X-Stat-Signature: 4ftfrkpui44sk9msznb7997i9rzq6stx X-HE-Tag: 1686602434-237347 X-HE-Meta: U2FsdGVkX1920TjQohWpE6ckH/GEccNMv71gEyIKazOscPNndhP87w//g/m8TI0CEo41ApPQTlPy5cxrBRiTLvWLzkPtyo+Fx3JJ1dH7vCBfhBaF6sMxoyez5w4yHTb3hJH+fV7+htfVA6krv5uuJIRA+OHwDQ1CnMSEzLb+oMXdytpqtExTDnJrTQa1379pF3mUnXwxnb3xAYOoPIq32kxf2ICjcH0nWX4cjlWLR1ZHFxWfRy+DypJn2oNeq4rRq6FLzV3oaibWGMelQ0U8fESN2+sLtxVTM2673NMihz4lg56y5YTw8GEVsz6EjuuSgvRaU/2UCSIw9QEzbi+SQ072aGqKPEDCkcDc8s9HxMd68bhDZrI67spduOy6ixDM1wwK8rbjY1C4nIlfmpwapqt4ne11UCZpkldxNm4eXK9AvOf9PPgDmblOM4WvGtoBIHvoM8HA5ppE9zSDN8xsioWE1oiPw8kbnh8KbIclR5YJkbIU2t7+II7hNGvCwBckpHbiqPaZQRhdKPik5eSEqi3TlK18tkae7KsLGJnhGSBrpjre/UjdRUH+WNhW3NETZLIdHRs6Q2RDh6eu1AioqKd0OWWNQ6Z4aJnDigdJtdNYtoooqwEnb+8Z8eWP//BAxOlN2GceEfLS7AQtJEh+2zMc4+wYs3+fwNK1YkssK+Rc/URPNhaVgNuccO0VoNZAPF75hKI6tm0s06CTLj/JLggvwVxAhxw4DjwYld1HPbTtWGn3kXVNjUfZ+sTmB+Wyx0zd/gAMfotLI2hGf9LjGk+FNsR4+3aKPJ+RmDv4hQIstZNlzhaL4XwHNlocVZirU8/6nGurt0Qa2w/GjzrTsiBN7X7MyRMY2qUQZXLo2YuO5/FUiCaUbCvXCsU239fd4io9QdrK/6wrsfyp24P6PF4DKsGdEBvwsDmIO/EUyV2PiMyoU7P0tAmHxJ8sJdSflWcV1TPKQ8OiAPjiD1T i3hKmTua UlDjN1NqPvfNaH+BYXWaJnZ3gTF4Q3Yt7PNStRRvn/Rm1TDwxkba3qh3TTeidRMnTVj0Popee1dwMmz1pSCABXhbMJBiSWG1Oqi90LGmNSld1541lsoiAp7uo1GZOs9ZhlW52ohxqZVmI+TbpG0LG7r++Kolr9hVXwW7grW2icHWEiqXDztA8A9p/ebG7FQJ/H/GOYm31YavYQD8le4W4YCjkddWdiwGIryZ9yA1RreboB4CqsYiWBqvwSFRtbmZfTvIYTQgKMQ7FLUa1eXrg/awyXME7jOopXL32NZEiFj9pTYVn0vCwnFBxu46LfXo5wSgnUZ8cAIn/Xdo+v3KI2SkTrTdXsbmGdRfuhR5jvjauiBSwrqusB2MM1xiNrJmXYRgs1awq8uyJgiQHpyGg8GNDywT/ApL7dAJZ1fo9AOFCXDM= 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 |
Reduce preallocations for maple tree
|
expand
|
diff --git a/lib/maple_tree.c b/lib/maple_tree.c index bfffbb7cab26..815c64f4c370 100644 --- a/lib/maple_tree.c +++ b/lib/maple_tree.c @@ -3166,7 +3166,7 @@ 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, 1 + empty_count * 3); + mas_node_count(mas, empty_count * 2 - 1); if (mas_is_err(mas)) return 0;
mas_rebalance() is called to rebalance an insufficient node into a single node or two sufficient nodes. The preallocation estimate is always too many in this case as the height of the tree will never grow and there is no possibility to have a three way split in this case, so revise the node allocation count. Signed-off-by: Liam R. Howlett <Liam.Howlett@oracle.com> --- lib/maple_tree.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)