Received: by 2002:a05:6358:3188:b0:123:57c1:9b43 with SMTP id q8csp80682rwd; Wed, 31 May 2023 19:24:41 -0700 (PDT) X-Google-Smtp-Source: ACHHUZ6/I+mrfYjR7PNyns4kLJcx5qJLZB8o7iSuiXkxmRLMCQeAwIL0vfKGHTqBrSs8L16W9HIF X-Received: by 2002:a05:6a00:124e:b0:634:7ba3:d140 with SMTP id u14-20020a056a00124e00b006347ba3d140mr9203730pfi.15.1685586281209; Wed, 31 May 2023 19:24:41 -0700 (PDT) ARC-Seal: i=2; a=rsa-sha256; t=1685586281; cv=pass; d=google.com; s=arc-20160816; b=VaksHYHaIvNwiwKO/3yKQ9sGthmF3TqmsH9XmurDQoOmy2QxMW4b63lADGJ3v9XNAU kYHYrJ21hREy3QWGIlh4WFge4XMztzw2ecmsz1AtgPrAXjQQOahWU/6pYrwbvtyVrMc1 hVjpXq9VM5etT9nFY66TpnN/iLE3nGewZga06QLyqaPlOeh8ouZNxuGb97FoW0jlLI9C yB5muWCHcHQFhEZ9YAAGrRxa14jUhABYEvvmGLuVwhX5oB3Oaca9kVj5Z3Qda258/yq8 1DNJdDjQoT7RgmiINngsskVXfGokpCsMNTZ0raoQiWwcWE1Em7208hH6XIvKt268/c8i OcCw== ARC-Message-Signature: i=2; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:mime-version:content-transfer-encoding :references:in-reply-to:message-id:date:subject:cc:to:from :dkim-signature:dkim-signature; bh=hNNPNCDvHhDl4WRLh9/7Z8qWAAWKO6ttK4dq+KZRwuk=; b=jUwP7m+Z5Rbi9Iq8z4oed6OXNq36jYVb/Ov6meWZ08iv5Iokvkl2L7lfn2yrhl/FDv InYjqfagla/D4yTl6/N7qc1UP82p//JLvinq3ywlUdhvPrqQwIHwjZ7EH01BSi45SzKv c5LTP2966+u7BSOz6SxpN5YRgSCQfeEWoIPC7NS38gs496WyL0CXsJ5fVkhYFwPyeE/8 k3afRiXfy7StghjkA8j1XFR8gwCD7uGE+Mzydux4i6E+nA3u+/Q9N7osYo3NLMep5VVj CYXh+JVzdDW0vAx7uzuAXs2b7irTJeeTU2H4AC42Ig00xak9kuRiSSb1fWG7XhgEFd/A 15Xg== ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@oracle.com header.s=corp-2023-03-30 header.b=Wl44DzIM; dkim=pass header.i=@oracle.onmicrosoft.com header.s=selector2-oracle-onmicrosoft-com header.b=cT6l5As4; arc=pass (i=1 spf=pass spfdomain=oracle.com dkim=pass dkdomain=oracle.com dmarc=pass fromdomain=oracle.com); spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=oracle.com Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id k8-20020aa79988000000b0064f735aef04si4602404pfh.209.2023.05.31.19.24.28; Wed, 31 May 2023 19:24:41 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) client-ip=2620:137:e000::1:20; Authentication-Results: mx.google.com; dkim=pass header.i=@oracle.com header.s=corp-2023-03-30 header.b=Wl44DzIM; dkim=pass header.i=@oracle.onmicrosoft.com header.s=selector2-oracle-onmicrosoft-com header.b=cT6l5As4; arc=pass (i=1 spf=pass spfdomain=oracle.com dkim=pass dkdomain=oracle.com dmarc=pass fromdomain=oracle.com); spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=oracle.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S230504AbjFACQr (ORCPT + 99 others); Wed, 31 May 2023 22:16:47 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:50902 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S230473AbjFACQl (ORCPT ); Wed, 31 May 2023 22:16:41 -0400 Received: from mx0a-00069f02.pphosted.com (mx0a-00069f02.pphosted.com [205.220.165.32]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 3B6A618B for ; Wed, 31 May 2023 19:16:38 -0700 (PDT) Received: from pps.filterd (m0333521.ppops.net [127.0.0.1]) by mx0b-00069f02.pphosted.com (8.17.1.19/8.17.1.19) with ESMTP id 34VJt9tc020026; Thu, 1 Jun 2023 02:16:31 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=hNNPNCDvHhDl4WRLh9/7Z8qWAAWKO6ttK4dq+KZRwuk=; b=Wl44DzIMGCvGjeCfHa7f8zMkFqwaZSFKHevccsxOj+hoVdlVWFvUqc/7W6rN0OHGIjM3 uf8W2wdhrki/cfV8/yt5rHoIaMu1oaInVAHPBpfAqPdAg5i8xkoemI/Ry63OmcsfI4Gh FY+U1L64fvJwz0cE3QruovRAj3iSMmPtK2LoG6kgcoFC23h5bxQYt6v30OdXTi1pPN17 0Ndvzgpwu5nrxd/nIRRyjbN86hwfQ/uxu4/fy/IEseir4s4pnxuBkVYoakSfab8mE7YX C4F3iXVEpmWn0V9HT3o8rG4mrKgtqMHelDxNKuNWcgsZZw764sJk2+1iUgvBHIFHU7zz VA== Received: from phxpaimrmta01.imrmtpd1.prodappphxaev1.oraclevcn.com (phxpaimrmta01.appoci.oracle.com [138.1.114.2]) by mx0b-00069f02.pphosted.com (PPS) with ESMTPS id 3qvhjh7hb0-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=OK); Thu, 01 Jun 2023 02:16:31 +0000 Received: from pps.filterd (phxpaimrmta01.imrmtpd1.prodappphxaev1.oraclevcn.com [127.0.0.1]) by phxpaimrmta01.imrmtpd1.prodappphxaev1.oraclevcn.com (8.17.1.19/8.17.1.19) with ESMTP id 3510E5VY014631; Thu, 1 Jun 2023 02:16:30 GMT Received: from nam10-dm6-obe.outbound.protection.outlook.com (mail-dm6nam10lp2101.outbound.protection.outlook.com [104.47.58.101]) by phxpaimrmta01.imrmtpd1.prodappphxaev1.oraclevcn.com (PPS) with ESMTPS id 3qu8a6gr6q-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=OK); Thu, 01 Jun 2023 02:16:30 +0000 ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=e0BumRofVVkgtYj148LE39NaTPTU/euKc5qywBm8QBQh4gYVMfzn8xRZWB/UgqVL5MeHE7/xxmuIXTH0wOG/hp9dU6ECxnuF+52I0qDlATdaJzPXbTUPQ8bQgI2l7JoybSVJ1AS9B+PKSMp0zygUHcNNa8y1JKGvxQU0uk9S6Gh2IDKbi3m3dHzxi7sC7E0D3wLgq4dyeRu76NJgjORYTuYDdRgpGyKhqvZZvJfR6BMvSUWj7AvqK3G4SLB6NWItxZgrggf+KhXA76r+QIH4A+dB/ZpyN9L2Bq19BbCVrsYlYWVo39TS6HHovawvsYUs+K8YeQk/WCncX9RmjzkKrQ== 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=hNNPNCDvHhDl4WRLh9/7Z8qWAAWKO6ttK4dq+KZRwuk=; b=P0/NI6+COntkDg6p9tzbhsOUDJFvJ+HMLb+Eo1ckzGCYTBn6Yi/OFGTA358kvEnixF6hy72ZFRu4JUdj0PTPjBWoomCwuqhLbFaB0hoWe/5gDmlca8veqxPGBZm8iCqe8iIgqPxpkeN7QkSGSzCwkJlAcR3z9pNnxyw/gRK4G95RUiafXkfd4dG95dVcpugq5C6Si+7UhpNizIqSU+Qo2RLGMqG1hrxL3DMZId8XmOREffbieft0stZy33lStqOfoFznX/Eu0NmHJuk0mRW127GeWVl+GyGo332QHnS2K7Gi9MV6i6GR5iqmrHa3vaNuV0d8vtVo6npKSdiL2J9wgw== 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=hNNPNCDvHhDl4WRLh9/7Z8qWAAWKO6ttK4dq+KZRwuk=; b=cT6l5As4e/mIS3e82hFW2iUEdlld5paPqWcwVboq03FIdmH1rsZpdcGGa22m7nejlkHKbdILpvNEzP/qjtDOBuRsnlCRCtG/aPxEw0mh2YOybNs4iS996bIQyfqtcgjfLogMoYnOkB0VbXedHoNHCV6Ehsr932qLmvkpCr4u4Xc= Received: from SN6PR10MB3022.namprd10.prod.outlook.com (2603:10b6:805:d8::25) by SJ0PR10MB4687.namprd10.prod.outlook.com (2603:10b6:a03:2d8::12) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.6455.23; Thu, 1 Jun 2023 02:16: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.6433.024; Thu, 1 Jun 2023 02:16:19 +0000 From: "Liam R. Howlett" To: Andrew Morton Cc: maple-tree@lists.infradead.org, linux-mm@kvack.org, linux-kernel@vger.kernel.org, "Liam R. Howlett" Subject: [PATCH 01/14] maple_tree: Add benchmarking for mas_for_each Date: Wed, 31 May 2023 22:15:52 -0400 Message-Id: <20230601021605.2823123-2-Liam.Howlett@oracle.com> X-Mailer: git-send-email 2.39.2 In-Reply-To: <20230601021605.2823123-1-Liam.Howlett@oracle.com> References: <20230601021605.2823123-1-Liam.Howlett@oracle.com> Content-Transfer-Encoding: 8bit Content-Type: text/plain X-ClientProxiedBy: YT4PR01CA0339.CANPRD01.PROD.OUTLOOK.COM (2603:10b6:b01:fc::22) To SN6PR10MB3022.namprd10.prod.outlook.com (2603:10b6:805:d8::25) MIME-Version: 1.0 X-MS-PublicTrafficType: Email X-MS-TrafficTypeDiagnostic: SN6PR10MB3022:EE_|SJ0PR10MB4687:EE_ X-MS-Office365-Filtering-Correlation-Id: 21388493-825e-42de-318a-08db62462faa X-MS-Exchange-SenderADCheck: 1 X-MS-Exchange-AntiSpam-Relay: 0 X-Microsoft-Antispam: BCL:0; X-Microsoft-Antispam-Message-Info: UtGOTpr6zFlGqyFII+6yRqbd9Ij8/9J4f4CwHpTcNpL/5+c0X361irVimr1Ep0JGZKxY3199mqW9eP2U720d40DlelB5pNQPaZ3O5i2LabmvGFM1X2KdJMTWi5sBO9XWQQJ1sYcUyzBRxiz4LRfclFdsiKEk5Eki7jbz+2ZbG1togz2lcBmKmlrdgREI+tvEHuF0h3Vi564pNrWzzRNTz07nWFItcFlodFbiVLQaLQ7yx9lz1eqnpFCxLGrc3HVadYSZhCtPQ0tOVZLcRwnUKBtRviHzqADdretn/DtpMB0MXG7cRb9JGZgjAOXEsNp9Gdu4XG6WPoUTibU7NaOgDGSsqcYZnXtp103UnINtd5OsCJ6REFgc0LXLti8PQ6XzdWrs3Q0XNUJQaCqEsB4AEIJmLf3ZuAv8SoF0cpxdQFoTFGqHjQqk1UYLzPzIHA3YIrX+PKlYr8yDImqogl3+JMkZp1FX4XFHd7WKWXez1q1fWsG/cOwsxjA+dLP1brXfksFKML+IofUBXXSzxEQ05qRlREI98Z2uuge7pC5wzurF/5K2ydBrNr8Eqn96hIXt 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)(396003)(39860400002)(136003)(346002)(376002)(366004)(451199021)(36756003)(38100700002)(86362001)(8936002)(8676002)(41300700001)(107886003)(5660300002)(26005)(1076003)(6506007)(6512007)(2906002)(186003)(2616005)(83380400001)(6666004)(6486002)(66556008)(66476007)(66946007)(316002)(478600001)(6916009)(4326008);DIR:OUT;SFP:1101; X-MS-Exchange-AntiSpam-MessageData-ChunkCount: 1 X-MS-Exchange-AntiSpam-MessageData-0: =?us-ascii?Q?BHSEWj66j8mV+uDESMp/8VFkbYO+MV44bevas5Ha0mu9/iZqS2jHCJyEw7pN?= =?us-ascii?Q?G539ZHooJIvfwF7Jma+1GMhAytMZMiiUV3H/WRVuGZmOKM9g35d/iRzTiKK5?= =?us-ascii?Q?K4lK2RjR3CB6pDEiCVHTLPfBWvXee1aTRszuuFQBQlkZOdXjRgBAlF1aVODk?= =?us-ascii?Q?sv7xCycTkQ7EOSS6jeWSVa7gTC/aCEXwI6OSm86Zj7vl5GRLlclKiWIBZ7GS?= =?us-ascii?Q?CsPDs3xF33sQSsB9cA3NrBY0i0h23/mWrWIK95tfuVMx3hh1CPSLGS4TxeLB?= =?us-ascii?Q?bQsBf2u8GDcPVv6kOPXWf2jN/TM/ngI4i+rjDXLtgYxMkE8K7czhJCLR4grh?= =?us-ascii?Q?RFW+xnicc7jHrfiofWhAxUXcv/aFhB+G2XBL6tNRDMc5XcvLJlQJUzQJqDn0?= =?us-ascii?Q?UEOgoaGRhVrI3XG7jTP5HJlhSQ8cNIl9Pg/IbMyCfkGoKiccsGLQ0YzwolMG?= =?us-ascii?Q?xUpyAOKXAUCRUDjOKd46bfjShxH/1MrsxAE34YtxleiF8hloUnMa2Gl3JIYw?= =?us-ascii?Q?+oOO4Hzn0IMBaOyTtIqzb1zwlm2ZsOIUz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edqShiaq9H67Akj1YNNoNwKLPE+CzyNfDHKp+eaQ1uFqJUw7kCsxNpv8qtfjz0X9WUO5ynz8DmtKBmDjyLqG7SE2b1rZjomMtJF1ab+H9M6KeYcG8IHRFxzE9M7AJv1RyNTjsTcg== X-OriginatorOrg: oracle.com X-MS-Exchange-CrossTenant-Network-Message-Id: 21388493-825e-42de-318a-08db62462faa X-MS-Exchange-CrossTenant-AuthSource: SN6PR10MB3022.namprd10.prod.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Internal X-MS-Exchange-CrossTenant-OriginalArrivalTime: 01 Jun 2023 02:16:19.1550 (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: DzrGHif99CZjSZUb65ZQ6wrh3HUuA9OtTd/84ewcUJqg+EKyNtpwMp5Mm7m9012+ot8sqoG23iYuBOvjEovKeg== X-MS-Exchange-Transport-CrossTenantHeadersStamped: SJ0PR10MB4687 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-05-31_18,2023-05-31_03,2023-05-22_02 X-Proofpoint-Spam-Details: rule=notspam policy=default score=0 suspectscore=0 adultscore=0 spamscore=0 phishscore=0 malwarescore=0 mlxlogscore=999 mlxscore=0 bulkscore=0 classifier=spam adjust=0 reason=mlx scancount=1 engine=8.12.0-2304280000 definitions=main-2306010016 X-Proofpoint-GUID: -Uc8XSWebcAtuRfKkCAt5pLCsuA9bRo1 X-Proofpoint-ORIG-GUID: -Uc8XSWebcAtuRfKkCAt5pLCsuA9bRo1 X-Spam-Status: No, score=-2.8 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,RCVD_IN_DNSWL_LOW, RCVD_IN_MSPIKE_H5,RCVD_IN_MSPIKE_WL,SPF_HELO_NONE,SPF_NONE, T_SCC_BODY_TEXT_LINE autolearn=ham autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lindbergh.monkeyblade.net Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Add a way to test the speed of mas_for_each() to the testing code. Signed-off-by: Liam R. Howlett --- lib/test_maple_tree.c | 38 ++++++++++++++++++++++++++++++++++++++ 1 file changed, 38 insertions(+) diff --git a/lib/test_maple_tree.c b/lib/test_maple_tree.c index 9939be34e516..3dbf99c3f2b1 100644 --- a/lib/test_maple_tree.c +++ b/lib/test_maple_tree.c @@ -44,6 +44,7 @@ atomic_t maple_tree_tests_passed; /* #define BENCH_WALK */ /* #define BENCH_MT_FOR_EACH */ /* #define BENCH_FORK */ +/* #define BENCH_MAS_FOR_EACH */ #ifdef __KERNEL__ #define mt_set_non_kernel(x) do {} while (0) @@ -1705,6 +1706,36 @@ static noinline void __init bench_mt_for_each(struct maple_tree *mt) } #endif +#if defined(BENCH_MAS_FOR_EACH) +static noinline void __init bench_mas_for_each(struct maple_tree *mt) +{ + int i, count = 1000000; + unsigned long max = 2500; + void *entry; + MA_STATE(mas, mt, 0, 0); + + for (i = 0; i < max; i += 5) { + int gap = 4; + if (i % 30 == 0) + gap = 3; + mtree_store_range(mt, i, i + gap, xa_mk_value(i), GFP_KERNEL); + } + + rcu_read_lock(); + for (i = 0; i < count; i++) { + unsigned long j = 0; + + mas_for_each(&mas, entry, max) { + MT_BUG_ON(mt, entry != xa_mk_value(j)); + j += 5; + } + mas_set(&mas, 0); + } + rcu_read_unlock(); + +} +#endif + /* check_forking - simulate the kernel forking sequence with the tree. */ static noinline void __init check_forking(struct maple_tree *mt) { @@ -3430,6 +3461,13 @@ static int __init maple_tree_seed(void) mtree_destroy(&tree); goto skip; #endif +#if defined(BENCH_MAS_FOR_EACH) +#define BENCH + mt_init_flags(&tree, MT_FLAGS_ALLOC_RANGE); + bench_mas_for_each(&tree); + mtree_destroy(&tree); + goto skip; +#endif mt_init_flags(&tree, MT_FLAGS_ALLOC_RANGE); check_iteration(&tree); -- 2.39.2