From patchwork Mon Oct 16 03:22:23 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Peng Zhang X-Patchwork-Id: 13422450 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 23944CDB465 for ; Mon, 16 Oct 2023 03:23:32 +0000 (UTC) Received: by kanga.kvack.org (Postfix) id B40768D0026; Sun, 15 Oct 2023 23:23:31 -0400 (EDT) Received: by kanga.kvack.org (Postfix, from userid 40) id AF0668D0001; Sun, 15 Oct 2023 23:23:31 -0400 (EDT) X-Delivered-To: int-list-linux-mm@kvack.org Received: by kanga.kvack.org (Postfix, from userid 63042) id 9B8648D0026; Sun, 15 Oct 2023 23:23:31 -0400 (EDT) X-Delivered-To: linux-mm@kvack.org Received: from relay.hostedemail.com (smtprelay0013.hostedemail.com [216.40.44.13]) by kanga.kvack.org (Postfix) with ESMTP id 898B68D0001 for ; Sun, 15 Oct 2023 23:23:31 -0400 (EDT) Received: from smtpin01.hostedemail.com (a10.router.float.18 [10.200.18.1]) by unirelay02.hostedemail.com (Postfix) with ESMTP id 62579120A69 for ; Mon, 16 Oct 2023 03:23:31 +0000 (UTC) X-FDA: 81349879422.01.F5CE292 Received: from mail-pf1-f175.google.com (mail-pf1-f175.google.com [209.85.210.175]) by imf17.hostedemail.com (Postfix) with ESMTP id A25A940006 for ; Mon, 16 Oct 2023 03:23:29 +0000 (UTC) Authentication-Results: imf17.hostedemail.com; dkim=pass header.d=bytedance.com header.s=google header.b=CBEtQwkg; dmarc=pass (policy=quarantine) header.from=bytedance.com; spf=pass (imf17.hostedemail.com: domain of zhangpeng.00@bytedance.com designates 209.85.210.175 as permitted sender) smtp.mailfrom=zhangpeng.00@bytedance.com ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=hostedemail.com; s=arc-20220608; t=1697426609; 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-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references:dkim-signature; bh=QmT9t2gNl7JC/Wj/BeBLe/fYUtz3EaMSD0bTELVUlD4=; b=4H+Q2vr8xTn7/RFYtcTp1JndRSfV/y6DUWSX8xcyXBAyZHn+QaS8Oaf6GGXA3JobdarrCu wCQLClp797/LUEaCAYiEzzP0/TSrFLady10z5ZFqLZZLduL4OK/xK/DgQopsuhUcJpr1Bn Tyv2D+BiKOCS/uWzkyVCLfRdxB52jq0= ARC-Authentication-Results: i=1; imf17.hostedemail.com; dkim=pass header.d=bytedance.com header.s=google header.b=CBEtQwkg; dmarc=pass (policy=quarantine) header.from=bytedance.com; spf=pass (imf17.hostedemail.com: domain of zhangpeng.00@bytedance.com designates 209.85.210.175 as permitted sender) smtp.mailfrom=zhangpeng.00@bytedance.com ARC-Seal: i=1; s=arc-20220608; d=hostedemail.com; t=1697426609; a=rsa-sha256; cv=none; b=cRJu+8NI5FevMLmydCdtjUlDPGV3ICapkx1B+dE0IyGN0aKC59bK/VjCEBcwlL4cr0Cx3L kEGasa2KMha/Bq6Nbmt47VphsPePAx4bQV76wifCrdM+jmz6Roe4n/ZFCUuHfoNhuwp2aP UeKJXZ+Nnta0eWJVLYUFz8pPxKj2hGo= Received: by mail-pf1-f175.google.com with SMTP id d2e1a72fcca58-6bce254ba56so716153b3a.1 for ; Sun, 15 Oct 2023 20:23:29 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=bytedance.com; s=google; t=1697426608; x=1698031408; darn=kvack.org; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:from:to:cc:subject:date :message-id:reply-to; bh=QmT9t2gNl7JC/Wj/BeBLe/fYUtz3EaMSD0bTELVUlD4=; b=CBEtQwkg2haKEjFO3GpAUivB6JzBu+XVVUIodp6fo2eWgvfVSAFin8NIognGKfO2cf CGujbAMA5sK6Ulltf86WEFQxoMgvFxzkP4P6h7jZUl6Euopsk5sUmJJaS/QUxtyJOoRy OfP70C5QCa1n9GsahOVa2Kn4SaK0QLpLIKSeHzE+9v+4vC7rktwBynBR4KisrSeUCU4c 6KXR7n4MDHGl/Lkb+soaiFKaT73z9UwteGcnl6PRzaDyg8cAx+dt+PiM3mzw/7coB+e0 DanWXjPQQBJUhr1F/7ndt4w/Wuj3s1+DRG+JjneTkRSlC34p9DltZSDf/kILU2ejlrSm g4YQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1697426608; x=1698031408; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=QmT9t2gNl7JC/Wj/BeBLe/fYUtz3EaMSD0bTELVUlD4=; b=xR2df6yW9L4zrPbi5lmgm7DcCXZgh8nM1bfyOE69CtCUolNOIgduXPNBKd3jZHg7ld Bjkf4cxmqrPwO4QBmtuJCYNjtNW3xqzF8MCx0oh02i7VmmObBXoP+xdUnbJZ1HrUfGZr vD9F94qIHGJRpWAasZZdlkPzMNlahL5YE3AbciF3SEBEs/7lZsdgM7y9NhytWTtFjr8x inQWK7cnjcOJKHv2jRP5pMZX4bgM8rUNbpguL9pGP68d4lg8BE6YjMVDAPVQ23ESgGQo sCFkt5+2Vrr0LLx43Pjj7l/EzGxlnpQXgKysqlBekEspmfDorY3fPh4R/Uvk2TOmhsSn d5Mw== X-Gm-Message-State: AOJu0YyO1hIl4pIDnt6VYtKx0L4JyEd6ZNKI82KwC/XBXGyAiRZ2Fdkp SNub5uJILaB2apNcmkRY67aVpg== X-Google-Smtp-Source: AGHT+IFvL4hHx8r3LC1uMkvj+QBP/kQF+gthm2OJTyOv0wHL/s0lrpx6RI7lgcxm3OD63XtqW60qEg== X-Received: by 2002:a05:6a21:a58b:b0:15d:607b:5a39 with SMTP id gd11-20020a056a21a58b00b0015d607b5a39mr34613164pzc.30.1697426608596; Sun, 15 Oct 2023 20:23:28 -0700 (PDT) Received: from GL4FX4PXWL.bytedance.net ([139.177.225.232]) by smtp.gmail.com with ESMTPSA id d8-20020a17090ae28800b0027758c7f585sm3452770pjz.52.2023.10.15.20.23.22 (version=TLS1_3 cipher=TLS_CHACHA20_POLY1305_SHA256 bits=256/256); Sun, 15 Oct 2023 20:23:28 -0700 (PDT) From: Peng Zhang To: Liam.Howlett@oracle.com, corbet@lwn.net, akpm@linux-foundation.org, willy@infradead.org, brauner@kernel.org, surenb@google.com, michael.christie@oracle.com, mjguzik@gmail.com, mathieu.desnoyers@efficios.com, npiggin@gmail.com, peterz@infradead.org, oliver.sang@intel.com, mst@redhat.com Cc: zhangpeng.00@bytedance.com, maple-tree@lists.infradead.org, linux-mm@kvack.org, linux-doc@vger.kernel.org, linux-kernel@vger.kernel.org, linux-fsdevel@vger.kernel.org Subject: [PATCH v5 07/10] maple_tree: Skip other tests when BENCH is enabled Date: Mon, 16 Oct 2023 11:22:23 +0800 Message-Id: <20231016032226.59199-8-zhangpeng.00@bytedance.com> X-Mailer: git-send-email 2.39.3 (Apple Git-145) In-Reply-To: <20231016032226.59199-1-zhangpeng.00@bytedance.com> References: <20231016032226.59199-1-zhangpeng.00@bytedance.com> MIME-Version: 1.0 X-Rspamd-Queue-Id: A25A940006 X-Rspam-User: X-Rspamd-Server: rspam05 X-Stat-Signature: wt9rngzojfeyd89h7kyxcrxe31ye1y7q X-HE-Tag: 1697426609-826717 X-HE-Meta: U2FsdGVkX19hod8IcljIz4TJpw2Ijh49sB97PIiWeMs5PxUsPW1DqJBnGaQ1wjVwSUHNV2tEqZJ2iWkF+4LvOwxPVyzQhVKkrsDE883kW+S4fGwb9ft1Pg8iY7Vx8cLYEY1ZbDNR1YTMQKV2rO7k5XjwzW1y5sM1qXD0lPhwecqpCmkeg2ARXo4MyReJrIVpGCimR3W2gk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QPua5TaH0aGwfJIFiNK3BKJg2LQI6MME2W1mf7QjpsKC5nxejYXNFUVivzB6LZ0OTzUTtyVSKIZ0dnuDzUkw5J0aBoEZuF1jaM55G3vift0W19jXDm8X1wDtD7jQ9U5GazquPuosHhS5p2nC3OMV4Oxm1Y5JeLK6OAYIIwRbpVl8SQ== X-Bogosity: Ham, tests=bogofilter, spamicity=0.000023, version=1.2.4 Sender: owner-linux-mm@kvack.org Precedence: bulk X-Loop: owner-majordomo@kvack.org List-ID: Skip other tests when BENCH is enabled so that performance can be measured in user space. Signed-off-by: Peng Zhang --- lib/test_maple_tree.c | 8 ++++---- tools/testing/radix-tree/maple.c | 2 ++ 2 files changed, 6 insertions(+), 4 deletions(-) diff --git a/lib/test_maple_tree.c b/lib/test_maple_tree.c index 464eeb90d5ad..de470950714f 100644 --- a/lib/test_maple_tree.c +++ b/lib/test_maple_tree.c @@ -3585,10 +3585,6 @@ static int __init maple_tree_seed(void) pr_info("\nTEST STARTING\n\n"); - mt_init_flags(&tree, MT_FLAGS_ALLOC_RANGE); - check_root_expand(&tree); - mtree_destroy(&tree); - #if defined(BENCH_SLOT_STORE) #define BENCH mt_init_flags(&tree, MT_FLAGS_ALLOC_RANGE); @@ -3646,6 +3642,10 @@ static int __init maple_tree_seed(void) goto skip; #endif + mt_init_flags(&tree, MT_FLAGS_ALLOC_RANGE); + check_root_expand(&tree); + mtree_destroy(&tree); + mt_init_flags(&tree, MT_FLAGS_ALLOC_RANGE); check_iteration(&tree); mtree_destroy(&tree); diff --git a/tools/testing/radix-tree/maple.c b/tools/testing/radix-tree/maple.c index 12b3390e9591..cb5358674521 100644 --- a/tools/testing/radix-tree/maple.c +++ b/tools/testing/radix-tree/maple.c @@ -36299,7 +36299,9 @@ void farmer_tests(void) void maple_tree_tests(void) { +#if !defined(BENCH) farmer_tests(); +#endif maple_tree_seed(); maple_tree_harvest(); }