From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from CY3PR05CU001.outbound.protection.outlook.com (mail-westcentralusazon11013019.outbound.protection.outlook.com [40.93.201.19]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id E409B331A6E for ; Tue, 12 May 2026 06:35:58 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=fail smtp.client-ip=40.93.201.19 ARC-Seal:i=2; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1778567772; cv=fail; b=kET8KHXr/KIDHhB9oeN9cg/6LdPc5qmPbKTrpbrjMjmr3SGtzqLeo0N0ja83rWhS3vFfaFz8T9oCVmRaX5WHdxL5d1/BeozAoDWzmx+yvufGrgwqcoNbHeIxOZ9JY84GVN9MbNoY2PgtXh8J5mEo+J3A6KhdcXYKiFO9ytY0p8A= ARC-Message-Signature:i=2; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1778567772; c=relaxed/simple; bh=HJ6c3twEHEw/QL0J3iA+K701Cr73ByPJKxEva6qJeoA=; h=Message-ID:Date:MIME-Version:Subject:To:CC:References:From: In-Reply-To:Content-Type; b=MGuOUaZSKeHDR1GM3TxeQKumksVj/m1B8UzIOZ1kaEkfkGMPxFv4qxNJrAEF6BkeqIDMV489CX9TlRHtcozk9mPTab0idNbVl65y+Zv7YorXpeSPSVcnebG5+XXX4Fo8h/KJcB2h0udndPj+yuEX8M/eUa3ZDWgYABSRcQL8Dcc= ARC-Authentication-Results:i=2; smtp.subspace.kernel.org; dmarc=pass (p=quarantine dis=none) header.from=amd.com; spf=fail smtp.mailfrom=amd.com; dkim=pass (1024-bit key) header.d=amd.com header.i=@amd.com header.b=son3rH2V; arc=fail smtp.client-ip=40.93.201.19 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=quarantine dis=none) header.from=amd.com Authentication-Results: smtp.subspace.kernel.org; spf=fail smtp.mailfrom=amd.com Authentication-Results: smtp.subspace.kernel.org; dkim=pass (1024-bit key) header.d=amd.com header.i=@amd.com header.b="son3rH2V" ARC-Seal: i=1; a=rsa-sha256; s=arcselector10001; d=microsoft.com; cv=none; b=wE00qmlcZX0DM8v7NoBfBRQv/b/C7Ll0fScQ0WJ5oIt06BLVIIQYdijERwJuJCj2N09KWWy2lHccarYUbMScWS3OwqCPGd1k74e6ihsWOzIbIanMXVnLzjso2O1FstWpEfhq1EqE1iqgLm7mEkayct4GvQ8L0T0yHK1TpqWqTgOZW+qgbNhjAtm2lbG/qXR1oIJxLjqmbdeRcs1WaNzepu5VNoYcy9uij0BQjc8fHzTGUzHajRSM3RAd/coWRIpT22m6C3vbxOwD4xKhNgWEUQiqxJfriHmAOl4U1BvAjkxCw6FfFd7BsSCSUdLCg2IClKoxE1A9U7Fy0XCQzll6ow== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=microsoft.com; s=arcselector10001; 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=BoZZ2RtsVeczyHGtkhDzcEd4FZ+aVsVlt7ETnta1pXA=; b=YBs+tLwYvAwJbYrs656/xhz99rrfPtS5E0yrzBdz1oCsGXa9f3EF8qLZnLlX295UKu+JVf30/7DMWVtt59NfLScVR0NZZ6cQR6X08GpF/csCkaMhhK0AVAGQB2p4uk/dPt6IFDfKSyGB0YIv5M0IUqZH9adjqbrzhb3m1dWLLu0a/sLXV2EwdkQIVL6eSQLukJ17V+IEv1tmOf+TXUQlFxs9D1YeDypsxwoWsN0yVYUwOGdWOyv22/LZgI5+lW0GBWIk8JFAsBeRRkDa6Ft6MyCbD169T+A1XjBOWjCR/YqxIpoM8wTEKo4i8kZNlhzVyJqIvqFLRYNdK8f4zDv2Dg== ARC-Authentication-Results: i=1; mx.microsoft.com 1; spf=pass (sender ip is 165.204.84.17) smtp.rcpttodomain=infradead.org smtp.mailfrom=amd.com; dmarc=pass (p=quarantine sp=quarantine pct=100) action=none header.from=amd.com; dkim=none (message not signed); arc=none (0) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=amd.com; s=selector1; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=BoZZ2RtsVeczyHGtkhDzcEd4FZ+aVsVlt7ETnta1pXA=; b=son3rH2VbAfxbuSBq3EuvQN+grUr7813LW/wBsO7nFis3Xf6IaL3ScuWRCx8oK0vMnnxTcw/zutSXPwsInhfGN0eeDbzA53WulpumbEw7GPFJ7aOVfPX5M/AxQWyXHDd/XLdPm0dxINcyczFK1b7PQu3lGuuYstDxH9VnPLAf5Q= Received: from SJ2PR07CA0003.namprd07.prod.outlook.com (2603:10b6:a03:505::26) by SJ2PR12MB8649.namprd12.prod.outlook.com (2603:10b6:a03:53c::10) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.9891.18; Tue, 12 May 2026 06:35:51 +0000 Received: from SJ5PEPF000001F1.namprd05.prod.outlook.com (2603:10b6:a03:505:cafe::a1) by SJ2PR07CA0003.outlook.office365.com (2603:10b6:a03:505::26) with Microsoft SMTP Server (version=TLS1_3, cipher=TLS_AES_256_GCM_SHA384) id 15.20.9891.23 via Frontend Transport; Tue, 12 May 2026 06:35:51 +0000 X-MS-Exchange-Authentication-Results: spf=pass (sender IP is 165.204.84.17) smtp.mailfrom=amd.com; dkim=none (message not signed) header.d=none;dmarc=pass action=none header.from=amd.com; Received-SPF: Pass (protection.outlook.com: domain of amd.com designates 165.204.84.17 as permitted sender) receiver=protection.outlook.com; client-ip=165.204.84.17; helo=satlexmb07.amd.com; pr=C Received: from satlexmb07.amd.com (165.204.84.17) by SJ5PEPF000001F1.mail.protection.outlook.com (10.167.242.69) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.21.25.13 via Frontend Transport; Tue, 12 May 2026 06:35:51 +0000 Received: from [10.136.39.237] (10.180.168.240) by satlexmb07.amd.com (10.181.42.216) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.2.2562.41; Tue, 12 May 2026 01:35:46 -0500 Message-ID: <949b5985-c47e-4b22-ab63-eac3d290e70c@amd.com> Date: Tue, 12 May 2026 12:05:44 +0530 Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 User-Agent: Mozilla Thunderbird Subject: Re: [PATCH v3 26/30] maple_tree: Use maple copy node for mas_wr_split() To: "Liam R. Howlett" CC: "Liam R. Howlett" , Andrew Morton , , , , Suren Baghdasaryan , Matthew Wilcox , Sidhartha Kumar , Vlastimil Babka , Alice Ryhl , Kuninori Morimoto , Geert Uytterhoeven , Arnd Bergmann , Christian Kujau , SeongJae Park References: <20260130205935.2559335-1-Liam.Howlett@oracle.com> <20260130205935.2559335-27-Liam.Howlett@oracle.com> Content-Language: en-US From: "D, Suneeth" In-Reply-To: Content-Type: text/plain; charset="UTF-8"; format=flowed Content-Transfer-Encoding: 7bit X-ClientProxiedBy: satlexmb08.amd.com (10.181.42.217) To satlexmb07.amd.com (10.181.42.216) X-EOPAttributedMessage: 0 X-MS-PublicTrafficType: Email X-MS-TrafficTypeDiagnostic: SJ5PEPF000001F1:EE_|SJ2PR12MB8649:EE_ X-MS-Office365-Filtering-Correlation-Id: e4b3491b-816f-4ebc-1338-08deaff0b60f X-MS-Exchange-SenderADCheck: 1 X-MS-Exchange-AntiSpam-Relay: 0 X-Microsoft-Antispam: BCL:0;ARA:13230040|7416014|376014|1800799024|36860700016|82310400026|18002099003|56012099003|22082099003|11063799003|13003099007|3023799003; X-Microsoft-Antispam-Message-Info: 15cEr02AhlaJ5J8ZGhYbvdWQKcDwTiBZOr+t9fOJh1BjZ8G5tyozk5w+t73MBceZiI9krjZLTVuxD7MmMHTjv9tD+xHMq4hIEAy7g590IvrLbX8Wh7Du9k+g9kxshF6DK0GLJILAili9KW4zEv3P4N3cHzpqs2Pz2okczBfFQVM3uMqMV4cxDoeXcuZajABmgZo/SfBblPrQBzBYcyDorbWbgoxQgHtDypebnDOHJabqwPgTkpp9BEwhhSYOrTFtKkQet0CmDbnwgBrPh9tpkrpkZLuwKYzWhvqTn94vibbvxN9UBwMmFPs+8+SNQIoQl2G/Z+USH3qrTZtMhf1QsH79wOEd36AFxTK1XMkrxEIAZrzvL+93+rrUI3DgRaoUSlB2pphmzevbbW0yeZHFRvn2eeBTPJMQw5R7dnCdeaZ1/fFYPNHB6nZy2RhQeBMF1S1anKFTz10ZI2lD4iNeVZAvEx9feQXgSAIq8BAU55RBNHFnOoX4L+hVqjY8ikBYDlFEoNgtko4Ca13zRi++aYgT31z2D8Vef+rRqt1V5VoSHGUGQ/XDhrbwBPnW+Nw4dGmiJvcQEbW+FLz00AOK7xqJkhJBGCZuWMsTepkRMuXZzoCo+tL354xnVa8jhPy5vkG6C1Rbg80qgxED+sGUKNYFGYjwLRJgpaeG5jm6Yi3YruVzUcu/oNFC+Nge3xZRiJXru0OVkY6h9YZFRmT/Zh/pH8rReWYHXpQZAjSDL9g= X-Forefront-Antispam-Report: CIP:165.204.84.17;CTRY:US;LANG:en;SCL:1;SRV:;IPV:NLI;SFV:NSPM;H:satlexmb07.amd.com;PTR:InfoDomainNonexistent;CAT:NONE;SFS:(13230040)(7416014)(376014)(1800799024)(36860700016)(82310400026)(18002099003)(56012099003)(22082099003)(11063799003)(13003099007)(3023799003);DIR:OUT;SFP:1101; X-MS-Exchange-AntiSpam-MessageData-ChunkCount: 1 X-MS-Exchange-AntiSpam-MessageData-0: m2kKZeTIk2dxdOLuuQ1HLwNOf9coqNry7A1iwvAEOSHV05TL1H121ieIa6bE3CJH5yewlPqygWrmDM3LNaLwWS5FEPbrm1KG5i3aHhl4AmPyme8nXkNaMbklj+h3YCQ9IijKZXdHONfufy4BXsyp5DN3EVzpx9D0zm4xxQI6+NpSm3EHeWz3dOjdUhioxsXlwDIFBcmvZExoXF7+oRiphnLo+8cbI48SE6CMKlvhqySA/jzTAStn4T01CCoHmZ2wlwkAool/Ozi+KoumMg+G5SYFTVhSHrWEIrPVDFSNWb8cCu+lsWW5ZoO1irPBRNr7J8ID79sPT56y40VFwKgsyCeaTMjre8Q2VJUqMZhcJUP8uoWtPO0OyzqfVXn6MKRHYDUDLKQ8d4tLmPasxrg++Y77fab4JQfwnsEJkon0nmOeZXhC7YauvTPAxogQykEp X-OriginatorOrg: amd.com X-MS-Exchange-CrossTenant-OriginalArrivalTime: 12 May 2026 06:35:51.3840 (UTC) X-MS-Exchange-CrossTenant-Network-Message-Id: e4b3491b-816f-4ebc-1338-08deaff0b60f X-MS-Exchange-CrossTenant-Id: 3dd8961f-e488-4e60-8e11-a82d994e183d X-MS-Exchange-CrossTenant-OriginalAttributedTenantConnectingIp: TenantId=3dd8961f-e488-4e60-8e11-a82d994e183d;Ip=[165.204.84.17];Helo=[satlexmb07.amd.com] X-MS-Exchange-CrossTenant-AuthSource: SJ5PEPF000001F1.namprd05.prod.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Anonymous X-MS-Exchange-CrossTenant-FromEntityHeader: HybridOnPrem X-MS-Exchange-Transport-CrossTenantHeadersStamped: SJ2PR12MB8649 On 5/9/2026 2:48 AM, Liam R. Howlett wrote: > [You don't often get email from liam@infradead.org. Learn why this is important at https://aka.ms/LearnAboutSenderIdentification ] > > On 26/05/08 02:12PM, D, Suneeth wrote: >> Hi Liam Howlett, >> >> On 1/31/2026 2:29 AM, Liam R. Howlett wrote: >>> Instead of using the maple big node, use the maple copy node for reduced >>> stack usage and aligning with mas_wr_rebalance() and >>> mas_wr_spanning_store(). >>> >>> Splitting a node is similar to rebalancing, but a new evaluation of when >>> to ascend is needed. The only other difference is that the data is >>> pushed and never rebalanced at each level. >>> >>> The testing must also align with the changes to this commit to ensure >>> the test suite continues to pass. >>> >> >> We run will-it-scale micro-benchmark as part of our weekly CI for Kernel >> Performance Regression testing between a stable vs rc kernel. We >> observed will-it-scale-thread-brk1 variant was regressing with >> ~9% on an AMD's Turin machine between the kernels v7.0 and >> v7.1-rc1. Bisecting further landed me onto this commit >> 280b792cac62ddadca2935766ca870b438c86323 (maple_tree: Use maple copy node >> for mas_wr_split()) as the first bad >> commit. The following were the machine's configuration and test >> parameters used:- >> >> Model name: AMD EPYC 64-Core Processor [Turin] >> Thread(s) per core: 2 >> Core(s) per socket: 64 >> Socket(s): 2 >> Total online memory: 258G >> >> Test params: >> ------------ >> >> nr_task: [1 8 64 128 192 256] >> mode: thread >> test: brk1 >> kpi: per_thread_ops >> cpufreq_governor: performance >> >> The following are the stats after bisection:- >> (the KPI used here is per_thread_ops) >> >> v7.0 (baseline) %diff per_process_ops kernel_rc_ver >> --------------- ----- --------------- ------------- >> 353091 -9 321987 v7.1-rc1 >> 353091 -7 328897 v7.0-rc5-280b792cac62(culprit) >> 353091 -1 347884 v7.0-rc5-11e7f22f5e85(culpritm1) >> >> jFYI a very high level call trace from running will-it-scale-thread-brk1 >> which ends up in mas_wr_split goes like this, >> >> do_brk_flags() { >> may_expand_vm(); >> vma_merge_new_range() { >> vma_expand() { >> commit_merge() { >> vma_iter_store_overwrite(){ >> mas_store_prealloc(){ >> mas_wr_store_entry(){ >> mas_wr_split(); <--- Function of interest from this patch >> } /* mas_wr_store_entry */ >> } /* mas_store_prealloc */ >> } /* vma_iter_store_overwrite */ >> } /* commit_merge */ >> } /* vma_expand */ >> } /* do_brk_flags */ >> >> Recreation steps: >> ----------------- >> >> 1) git clone https://github.com/antonblanchard/will-it-scale.git >> 2) git clone https://github.com/intel/lkp-tests.git >> 3) cd will-it-scale && git apply >> lkp-tests/programs/will-it-scale/pkg/will-it-scale.patch >> 4) make >> 5) python3 ./runtest.py brk1 25 thread 0 0 1 8 64 128 192 256 >> >> NOTE: [5] is specific to machine's architecture. starting from 1 is the >> array of no.of tasks that you'd wish to run the testcase which here is >> no.cores per CCX, per NUMA node/ per Socket, nr_threads. >> >> Would be happy to help with further testing and providing additional >> data if required. > > Thank you for this report. > > Considering this is brk1() in thread mode, I'm going to tell you that > this test is seriously flawed and will not produce anything that looks > reasonable. The way it is written will race all over the place and thus > is unreliable. Thank you Liam and Matthew for your candid feedback. You're right that I should have reasoned about what brk1 in thread mode is actually measuring before treating the bisected delta as a real regression. > > Does the same test in processes show a regression? > No, the same test in process does not show a significant regression. v7.0 (baseline) %diff per_process_ops kernel_rc_ver --------------- ----- --------------- ------------- 1050189 -2 1027859 v7.1-rc1 Apologies for the noise, and thanks again for your time. > Thanks, > Liam > Thanks & Regards, Suneeth D