From patchwork Wed Mar 15 23:54:47 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Boqun Feng X-Patchwork-Id: 13176791 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 vger.kernel.org (vger.kernel.org [23.128.96.18]) by smtp.lore.kernel.org (Postfix) with ESMTP id 782D0C7618B for ; Wed, 15 Mar 2023 23:55:22 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S233153AbjCOXzV (ORCPT ); Wed, 15 Mar 2023 19:55:21 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:34028 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S231701AbjCOXzU (ORCPT ); Wed, 15 Mar 2023 19:55:20 -0400 Received: from mail-qt1-x82c.google.com (mail-qt1-x82c.google.com [IPv6:2607:f8b0:4864:20::82c]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 944465BCAB; Wed, 15 Mar 2023 16:55:11 -0700 (PDT) Received: by mail-qt1-x82c.google.com with SMTP id x1so61479qtr.7; Wed, 15 Mar 2023 16:55:11 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20210112; t=1678924510; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:feedback-id:from:to:cc:subject :date:message-id:reply-to; bh=JCvB485GQ0XREMndIlrLRmgekVvCXd6HiowEyGZFy4o=; b=Ou0NnoPpifgW2UaPywVGXVz3jKjPBJWxsqhVOo/WYojsl5oVx1KF3tqixZx6Zv/D+g LBFXYGror1hh5gH9be2pD/N0TLIejIoJ61eLkf13MREI2TBpKPYjmsdT4k0SBs7y6nGA 2Qp2PSYdIvrvCVVdCYnk5V9PKwFWFVSMTPeEmehdxLz5bEtrqZPUdQowdebyp/gy/76A XXaJXe7lxs8mpNG2RkQ1LyEDtrqmrkazA85ClhzrjJ+LyrjuunO0mvFAyjsfEG+l/ajn 0Z5lWda/lR+zRZ1AwzZVLvpVr67lPww0/e24JgCQvCokEKrvL0izeI4SC1In6c4LYFRL NQIg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; t=1678924510; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:feedback-id:x-gm-message-state :from:to:cc:subject:date:message-id:reply-to; bh=JCvB485GQ0XREMndIlrLRmgekVvCXd6HiowEyGZFy4o=; b=SgpN6Sp/yDfWPqRpFNnT+3vNocokDrREdRGuSbhHXUTrfvZQUeGWOBmyq2EYnv/k6t zZJzBPj2i+E3Qh/xITWhZrwDeo6b/95ZKfzLTKaq4//DuoKnDHo5Q3PJ/EO5kR/EbEPa 44OeHwv1yK3Co6qDu3LJpsfkgxxR39XZGswicE7Waha6dn9V3q87WRdwKYJHNRl7Ypk3 XQmeTiSB074qAQZG+pQT0QTFR931ZMFOCBIdPLJTlhkI5EUK3lBlDz6PkujtlKO1L55r fcGx+OzB3Z9ezSUX/fxxuViAs3AyCeOjmEfz23kfi0Y1uhFkfWu7zB+sm7uoKR32i8Es mmPg== X-Gm-Message-State: AO0yUKVDyUToBDgFy2eUz0kFEjdQ0G6CI6IGm76EqMHwv5mDVnfNTroa u9TCNVn4QhZEt88JwW6h2/U= X-Google-Smtp-Source: AK7set9NKKzAVilHub3b76RDBTBtCkNheYs6ZY9GNVYFJN92hlvByHj+NdGGJHF2Fwydh5upgmEyqw== X-Received: by 2002:a05:622a:60b:b0:3bf:d258:4a85 with SMTP id z11-20020a05622a060b00b003bfd2584a85mr2754375qta.66.1678924510572; Wed, 15 Mar 2023 16:55:10 -0700 (PDT) Received: from auth2-smtp.messagingengine.com (auth2-smtp.messagingengine.com. [66.111.4.228]) by smtp.gmail.com with ESMTPSA id p19-20020ac84093000000b003bfaae103f6sm4778033qtl.89.2023.03.15.16.55.09 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 15 Mar 2023 16:55:10 -0700 (PDT) Received: from compute4.internal (compute4.nyi.internal [10.202.2.44]) by mailauth.nyi.internal (Postfix) with ESMTP id B783627C0054; Wed, 15 Mar 2023 19:55:09 -0400 (EDT) Received: from mailfrontend1 ([10.202.2.162]) by compute4.internal (MEProxy); Wed, 15 Mar 2023 19:55:09 -0400 X-ME-Sender: X-ME-Received: X-ME-Proxy-Cause: gggruggvucftvghtrhhoucdtuddrgedvhedrvddvledgudeiucetufdoteggodetrfdotf fvucfrrhhofhhilhgvmecuhfgrshhtofgrihhlpdfqfgfvpdfurfetoffkrfgpnffqhgen uceurghilhhouhhtmecufedttdenucesvcftvggtihhpihgvnhhtshculddquddttddmne cujfgurhephffvvefufffkofgjfhgggfestdekredtredttdenucfhrhhomhepuehoqhhu nhcuhfgvnhhguceosghoqhhunhdrfhgvnhhgsehgmhgrihhlrdgtohhmqeenucggtffrrg htthgvrhhnpeegleejiedthedvheeggfejveefjeejkefgveffieeujefhueeigfegueeh geeggfenucevlhhushhtvghrufhiiigvpedtnecurfgrrhgrmhepmhgrihhlfhhrohhmpe gsohhquhhnodhmvghsmhhtphgruhhthhhpvghrshhonhgrlhhithihqdeiledvgeehtdei gedqudejjeekheehhedvqdgsohhquhhnrdhfvghngheppehgmhgrihhlrdgtohhmsehfih igmhgvrdhnrghmvg X-ME-Proxy: Feedback-ID: iad51458e:Fastmail Received: by mail.messagingengine.com (Postfix) with ESMTPA; Wed, 15 Mar 2023 19:55:09 -0400 (EDT) From: Boqun Feng To: rcu@vger.kernel.org Cc: Davidlohr Bueso , "Paul E. McKenney" , Josh Triplett , Frederic Weisbecker , Neeraj Upadhyay , Steven Rostedt , Mathieu Desnoyers , Lai Jiangshan , Joel Fernandes , Shuah Khan , Bhaskar Chowdhury , Boqun Feng , linux-kernel@vger.kernel.org, linux-kselftest@vger.kernel.org Subject: [PATCH rcu 1/8] rcutorture: Add test_nmis module parameter Date: Wed, 15 Mar 2023 16:54:47 -0700 Message-Id: <20230315235454.2993-2-boqun.feng@gmail.com> X-Mailer: git-send-email 2.39.2 In-Reply-To: <20230315235454.2993-1-boqun.feng@gmail.com> References: <20230315235454.2993-1-boqun.feng@gmail.com> MIME-Version: 1.0 Precedence: bulk List-ID: X-Mailing-List: rcu@vger.kernel.org From: "Paul E. McKenney" This commit adds a test_nmis module parameter to generate the specified number of NMI stack backtraces 15 seconds apart. This module parameter can be used to test NMI delivery and accompanying diagnostics. Note that this parameter is ignored when rcutorture is a module rather than built into the kernel. This could be changed with the addition of an EXPORT_SYMBOL_GPL(). [ paulmck: Apply kernel test robot feedback. ] Signed-off-by: Paul E. McKenney Signed-off-by: Boqun Feng --- kernel/rcu/rcutorture.c | 32 ++++++++++++++++++++++++++++++-- 1 file changed, 30 insertions(+), 2 deletions(-) diff --git a/kernel/rcu/rcutorture.c b/kernel/rcu/rcutorture.c index 8e6c023212cb..480bba142e3a 100644 --- a/kernel/rcu/rcutorture.c +++ b/kernel/rcu/rcutorture.c @@ -119,6 +119,7 @@ torture_param(int, stutter, 5, "Number of seconds to run/halt test"); torture_param(int, test_boost, 1, "Test RCU prio boost: 0=no, 1=maybe, 2=yes."); torture_param(int, test_boost_duration, 4, "Duration of each boost test, seconds."); torture_param(int, test_boost_interval, 7, "Interval between boost tests, seconds."); +torture_param(int, test_nmis, 0, "End-test NMI tests, 0 to disable."); torture_param(bool, test_no_idle_hz, true, "Test support for tickless idle CPUs"); torture_param(int, verbose, 1, "Enable verbose debugging printk()s"); @@ -2358,7 +2359,8 @@ rcu_torture_print_module_parms(struct rcu_torture_ops *cur_ops, const char *tag) "n_barrier_cbs=%d " "onoff_interval=%d onoff_holdoff=%d " "read_exit_delay=%d read_exit_burst=%d " - "nocbs_nthreads=%d nocbs_toggle=%d\n", + "nocbs_nthreads=%d nocbs_toggle=%d " + "test_nmis=%d\n", torture_type, tag, nrealreaders, nfakewriters, stat_interval, verbose, test_no_idle_hz, shuffle_interval, stutter, irqreader, fqs_duration, fqs_holdoff, fqs_stutter, @@ -2369,7 +2371,8 @@ rcu_torture_print_module_parms(struct rcu_torture_ops *cur_ops, const char *tag) n_barrier_cbs, onoff_interval, onoff_holdoff, read_exit_delay, read_exit_burst, - nocbs_nthreads, nocbs_toggle); + nocbs_nthreads, nocbs_toggle, + test_nmis); } static int rcutorture_booster_cleanup(unsigned int cpu) @@ -3273,6 +3276,29 @@ static void rcu_torture_read_exit_cleanup(void) torture_stop_kthread(rcutorture_read_exit, read_exit_task); } +static void rcutorture_test_nmis(int n) +{ +#if IS_BUILTIN(CONFIG_RCU_TORTURE_TEST) + int cpu; + int dumpcpu; + int i; + + for (i = 0; i < n; i++) { + preempt_disable(); + cpu = smp_processor_id(); + dumpcpu = cpu + 1; + if (dumpcpu >= nr_cpu_ids) + dumpcpu = 0; + pr_alert("%s: CPU %d invoking dump_cpu_task(%d)\n", __func__, cpu, dumpcpu); + dump_cpu_task(dumpcpu); + preempt_enable(); + schedule_timeout_uninterruptible(15 * HZ); + } +#else // #if IS_BUILTIN(CONFIG_RCU_TORTURE_TEST) + WARN_ONCE(n, "Non-zero rcutorture.test_nmis=%d permitted only when rcutorture is built in.\n", test_nmis); +#endif // #else // #if IS_BUILTIN(CONFIG_RCU_TORTURE_TEST) +} + static enum cpuhp_state rcutor_hp; static void @@ -3297,6 +3323,8 @@ rcu_torture_cleanup(void) return; } + rcutorture_test_nmis(test_nmis); + if (cur_ops->gp_kthread_dbg) cur_ops->gp_kthread_dbg(); rcu_torture_read_exit_cleanup(); From patchwork Wed Mar 15 23:54:48 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Boqun Feng X-Patchwork-Id: 13176790 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 vger.kernel.org (vger.kernel.org [23.128.96.18]) by smtp.lore.kernel.org (Postfix) with ESMTP id A7B8FC7618D for ; Wed, 15 Mar 2023 23:55:24 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S233180AbjCOXzY (ORCPT ); Wed, 15 Mar 2023 19:55:24 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:34090 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S233089AbjCOXzX (ORCPT ); Wed, 15 Mar 2023 19:55:23 -0400 Received: from mail-qt1-x82b.google.com (mail-qt1-x82b.google.com [IPv6:2607:f8b0:4864:20::82b]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id CF38D61A95; Wed, 15 Mar 2023 16:55:12 -0700 (PDT) Received: by mail-qt1-x82b.google.com with SMTP id d7so42839qtr.12; Wed, 15 Mar 2023 16:55:12 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20210112; t=1678924512; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:feedback-id:from:to:cc:subject :date:message-id:reply-to; bh=4dXDYH8FjRjj8ivrQgv2T5n0d4h+aXiv+bXsNJ1LcT4=; b=lha7OIlC9a0DJrlduqH7O3SbwIOA/SButloLbUu9GJe3sA+IEMTuwh4drlilo7DNLv KtM+qNJFZekXDCj7eIqDp7dngeyU9PbsHrNR1Fi9kI1a+zk6Nhk7cnxyf2vFcwwEtCiV g1TOHsCREwcmXXRFKwe6dfBdLe3ENhQmfkmOXOshrN9aM7HC/ScPI4NKbezUyWwOBi5l xEC4/1rDXsnBV+ywVnx6720A0cbv7TQyCQGSst/G84eyrlneoBLnFBo0kr5lBQAJWJdU u3NLRoXFEUZqrn/zN5QclmHVegguksfVzalaral9hInzcljgaC2L2b0o1rB5FVoZr5wy 3V/Q== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; t=1678924512; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:feedback-id:x-gm-message-state :from:to:cc:subject:date:message-id:reply-to; bh=4dXDYH8FjRjj8ivrQgv2T5n0d4h+aXiv+bXsNJ1LcT4=; b=DDNBDhAz/OIh/avbCkFkMSRUeboaL91x+dGQJ0RZj08Mg9IqH7N/Kgq01SHCTEH4/j aC/bu+XvqFYXl4EmU06RgKxRxuayudNakT41o2WiB5MfL5Jv24D/tvm2kxsD3Av80CPV 8a1fplLWjyXdgv3XG5AgXv+vCBu08RQkWaQySyuHkIY/cf4l2JOMAczzgSErZGbYe307 QqplTkQVGulQxkxZK0rgTsz1BIXjdr0/uEv7JvwS/PV7LytzKPHSIVcYvc5n9Jr8g79g IBYvhM8Gn/MVW7wlz1u7koMiGGFPn3qeFdqpgOge67e+BR+OJGDvDLDBlzJaY6kmKV5i HiCA== X-Gm-Message-State: AO0yUKVld0h0RyQqGLebsVyakSHzWJFjHQIN4hlO9PyFBzEfMVr1Wj8L UhOr2Jsb+vyg/UDxSUjUqj0= X-Google-Smtp-Source: AK7set9WcH9VotUZ1llfk+guVzJgXSnD72/JNcvA345ZQCkEhQeAIDyxz5UrhTBxvh9HMd6Szg4KWA== X-Received: by 2002:ac8:5f53:0:b0:3bf:da97:87dd with SMTP id y19-20020ac85f53000000b003bfda9787ddmr3268273qta.38.1678924512020; Wed, 15 Mar 2023 16:55:12 -0700 (PDT) Received: from auth2-smtp.messagingengine.com (auth2-smtp.messagingengine.com. [66.111.4.228]) by smtp.gmail.com with ESMTPSA id fp15-20020a05622a508f00b003bfa66b7484sm4707782qtb.35.2023.03.15.16.55.11 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 15 Mar 2023 16:55:11 -0700 (PDT) Received: from compute1.internal (compute1.nyi.internal [10.202.2.41]) by mailauth.nyi.internal (Postfix) with ESMTP id 10EC327C0054; Wed, 15 Mar 2023 19:55:11 -0400 (EDT) Received: from mailfrontend1 ([10.202.2.162]) by compute1.internal (MEProxy); Wed, 15 Mar 2023 19:55:11 -0400 X-ME-Sender: X-ME-Received: X-ME-Proxy-Cause: gggruggvucftvghtrhhoucdtuddrgedvhedrvddvledgudehucetufdoteggodetrfdotf fvucfrrhhofhhilhgvmecuhfgrshhtofgrihhlpdfqfgfvpdfurfetoffkrfgpnffqhgen uceurghilhhouhhtmecufedttdenucesvcftvggtihhpihgvnhhtshculddquddttddmne cujfgurhephffvvefufffkofgjfhgggfestdekredtredttdenucfhrhhomhepuehoqhhu nhcuhfgvnhhguceosghoqhhunhdrfhgvnhhgsehgmhgrihhlrdgtohhmqeenucggtffrrg htthgvrhhnpeegleejiedthedvheeggfejveefjeejkefgveffieeujefhueeigfegueeh geeggfenucevlhhushhtvghrufhiiigvpedtnecurfgrrhgrmhepmhgrihhlfhhrohhmpe gsohhquhhnodhmvghsmhhtphgruhhthhhpvghrshhonhgrlhhithihqdeiledvgeehtdei gedqudejjeekheehhedvqdgsohhquhhnrdhfvghngheppehgmhgrihhlrdgtohhmsehfih igmhgvrdhnrghmvg X-ME-Proxy: Feedback-ID: iad51458e:Fastmail Received: by mail.messagingengine.com (Postfix) with ESMTPA; Wed, 15 Mar 2023 19:55:10 -0400 (EDT) From: Boqun Feng To: rcu@vger.kernel.org Cc: Davidlohr Bueso , "Paul E. McKenney" , Josh Triplett , Frederic Weisbecker , Neeraj Upadhyay , Steven Rostedt , Mathieu Desnoyers , Lai Jiangshan , Joel Fernandes , Shuah Khan , Bhaskar Chowdhury , Boqun Feng , linux-kernel@vger.kernel.org, linux-kselftest@vger.kernel.org, "Zhang, Qiang1" Subject: [PATCH rcu 2/8] rcutorture: Set CONFIG_BOOTPARAM_HOTPLUG_CPU0 to offline CPU 0 Date: Wed, 15 Mar 2023 16:54:48 -0700 Message-Id: <20230315235454.2993-3-boqun.feng@gmail.com> X-Mailer: git-send-email 2.39.2 In-Reply-To: <20230315235454.2993-1-boqun.feng@gmail.com> References: <20230315235454.2993-1-boqun.feng@gmail.com> MIME-Version: 1.0 Precedence: bulk List-ID: X-Mailing-List: rcu@vger.kernel.org From: "Paul E. McKenney" There is now a BOOTPARAM_HOTPLUG_CPU0 Kconfig option that allows CPU 0 to be offlined on x86 systems. This commit therefore sets this option in the TREE01 rcutorture scenario in order to regularly test this capability. Reported-by: "Zhang, Qiang1" Signed-off-by: Paul E. McKenney Signed-off-by: Boqun Feng --- tools/testing/selftests/rcutorture/configs/rcu/TREE01 | 1 + 1 file changed, 1 insertion(+) diff --git a/tools/testing/selftests/rcutorture/configs/rcu/TREE01 b/tools/testing/selftests/rcutorture/configs/rcu/TREE01 index 8ae41d5f81a3..04831ef1f9b5 100644 --- a/tools/testing/selftests/rcutorture/configs/rcu/TREE01 +++ b/tools/testing/selftests/rcutorture/configs/rcu/TREE01 @@ -15,3 +15,4 @@ CONFIG_DEBUG_LOCK_ALLOC=n CONFIG_RCU_BOOST=n CONFIG_DEBUG_OBJECTS_RCU_HEAD=n CONFIG_RCU_EXPERT=y +CONFIG_BOOTPARAM_HOTPLUG_CPU0=y From patchwork Wed Mar 15 23:54:49 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Boqun Feng X-Patchwork-Id: 13176792 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 vger.kernel.org (vger.kernel.org [23.128.96.18]) by smtp.lore.kernel.org (Postfix) with ESMTP id BD2B2C7618D for ; Wed, 15 Mar 2023 23:55:29 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S233240AbjCOXz1 (ORCPT ); Wed, 15 Mar 2023 19:55:27 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:34124 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S233185AbjCOXzY (ORCPT ); Wed, 15 Mar 2023 19:55:24 -0400 Received: from mail-qt1-x835.google.com (mail-qt1-x835.google.com [IPv6:2607:f8b0:4864:20::835]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 985C662B7A; Wed, 15 Mar 2023 16:55:14 -0700 (PDT) Received: by mail-qt1-x835.google.com with SMTP id s12so46825qtq.11; Wed, 15 Mar 2023 16:55:14 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20210112; t=1678924513; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:feedback-id:from:to:cc:subject :date:message-id:reply-to; bh=rhLt/LypW20+3edLrh/Swq7OLAp9k0UMSWEIG6huLHQ=; b=qT6ryvEwdZUsb/ixUvkXe7gx+xrqIrLiCGpQNLy6LjWR+UG/LAmYRmqxSCHkPScIZV tzO8TfBPzhKu8KHUhrWAnnAWOmNWR6pX/zD8NwjKxFteHKeQo5hS5ABCHHsQqnGTknSm nm0alfOWaZ8Fl8V7Xr0rVc1/OjJO9hxuyc86lsAvlGuAq3NE5q3+7WhXoI28OjtaGbAh VIgmWw8dBmU1M2LnIw0jGo1srGwO5JxH0Mw2gysgSXuHlP3ak8T1MnrobF9fQsJxkH2p fZWJVgB8lYRZsMHvOT2SFFEGRB0mdnTwWHEWDOowB0OzOtIcBQsmRmX014xBLY/qCOJg 3LxA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; t=1678924513; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:feedback-id:x-gm-message-state :from:to:cc:subject:date:message-id:reply-to; bh=rhLt/LypW20+3edLrh/Swq7OLAp9k0UMSWEIG6huLHQ=; b=13Q4bVQJzPW+rZVr74Ddoy40tZnZPJ1ZYufZOev1Lk7qY9SeBH2xn1nGYkUzjaJKH4 7fc13jKrRfiDEHjJz4USNCP2LF6Ie7LacL31Nr/JbtY7IBGyxOTPs3fpwNm3yOeFOlX4 Ekif0xr/wVYh1ycKIZD0kZfKr2HVoYMvuMnEzpYVoyoup7UK8+0wxW2lhalxPfC+vUWz J/Ix/09HuA5+/xW/2kT6qEegoXl4mh2SKbkhbbM12QBCxm0jsPpfJM/w8LIehy1vKjWj NRf2sgG6NprWVWDQaUaA17XQmjo2xvoGLxP/SNdGNqGf2Er0KBW44xph4yrnClyoUvOa sWEg== X-Gm-Message-State: AO0yUKV+MZD7zq4h334KnDbgA4rt1SoFASy0vYn1hrecEAiT4uNNgT6d FU+uKnhDJWRO6lInuavUEH0= X-Google-Smtp-Source: AK7set+479pVexANE9V0g41ZZoiCSFUgEJzfnurt28MfLw31HXpwQ1kt7aTUMRrfKyRMvk8lHs3Jqg== X-Received: by 2002:a05:622a:314:b0:3bf:e364:1d19 with SMTP id q20-20020a05622a031400b003bfe3641d19mr2546074qtw.54.1678924513394; Wed, 15 Mar 2023 16:55:13 -0700 (PDT) Received: from auth2-smtp.messagingengine.com (auth2-smtp.messagingengine.com. [66.111.4.228]) by smtp.gmail.com with ESMTPSA id v5-20020a379305000000b0074235fc7a69sm4713983qkd.68.2023.03.15.16.55.12 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 15 Mar 2023 16:55:12 -0700 (PDT) Received: from compute4.internal (compute4.nyi.internal [10.202.2.44]) by mailauth.nyi.internal (Postfix) with ESMTP id 6406727C0054; Wed, 15 Mar 2023 19:55:12 -0400 (EDT) Received: from mailfrontend1 ([10.202.2.162]) by compute4.internal (MEProxy); Wed, 15 Mar 2023 19:55:12 -0400 X-ME-Sender: X-ME-Received: X-ME-Proxy-Cause: gggruggvucftvghtrhhoucdtuddrgedvhedrvddvledgudeiucetufdoteggodetrfdotf fvucfrrhhofhhilhgvmecuhfgrshhtofgrihhlpdfqfgfvpdfurfetoffkrfgpnffqhgen uceurghilhhouhhtmecufedttdenucesvcftvggtihhpihgvnhhtshculddquddttddmne cujfgurhephffvvefufffkofgjfhgggfestdekredtredttdenucfhrhhomhepuehoqhhu nhcuhfgvnhhguceosghoqhhunhdrfhgvnhhgsehgmhgrihhlrdgtohhmqeenucggtffrrg htthgvrhhnpeegleejiedthedvheeggfejveefjeejkefgveffieeujefhueeigfegueeh geeggfenucevlhhushhtvghrufhiiigvpedtnecurfgrrhgrmhepmhgrihhlfhhrohhmpe gsohhquhhnodhmvghsmhhtphgruhhthhhpvghrshhonhgrlhhithihqdeiledvgeehtdei gedqudejjeekheehhedvqdgsohhquhhnrdhfvghngheppehgmhgrihhlrdgtohhmsehfih igmhgvrdhnrghmvg X-ME-Proxy: Feedback-ID: iad51458e:Fastmail Received: by mail.messagingengine.com (Postfix) with ESMTPA; Wed, 15 Mar 2023 19:55:11 -0400 (EDT) From: Boqun Feng To: rcu@vger.kernel.org Cc: Davidlohr Bueso , "Paul E. McKenney" , Josh Triplett , Frederic Weisbecker , Neeraj Upadhyay , Steven Rostedt , Mathieu Desnoyers , Lai Jiangshan , Joel Fernandes , Shuah Khan , Bhaskar Chowdhury , Boqun Feng , linux-kernel@vger.kernel.org, linux-kselftest@vger.kernel.org Subject: [PATCH rcu 3/8] rcutorture: Make scenario TREE04 enable lazy call_rcu() Date: Wed, 15 Mar 2023 16:54:49 -0700 Message-Id: <20230315235454.2993-4-boqun.feng@gmail.com> X-Mailer: git-send-email 2.39.2 In-Reply-To: <20230315235454.2993-1-boqun.feng@gmail.com> References: <20230315235454.2993-1-boqun.feng@gmail.com> MIME-Version: 1.0 Precedence: bulk List-ID: X-Mailing-List: rcu@vger.kernel.org From: "Paul E. McKenney" This commit enables the RCU_LAZY Kconfig option in scenario TREE04 in order to provide some ongoing testing of this configuration. Signed-off-by: Paul E. McKenney Signed-off-by: Boqun Feng --- tools/testing/selftests/rcutorture/configs/rcu/TREE04 | 1 + 1 file changed, 1 insertion(+) diff --git a/tools/testing/selftests/rcutorture/configs/rcu/TREE04 b/tools/testing/selftests/rcutorture/configs/rcu/TREE04 index ae395981b5e5..dc4985064b3a 100644 --- a/tools/testing/selftests/rcutorture/configs/rcu/TREE04 +++ b/tools/testing/selftests/rcutorture/configs/rcu/TREE04 @@ -15,3 +15,4 @@ CONFIG_DEBUG_LOCK_ALLOC=n CONFIG_DEBUG_OBJECTS_RCU_HEAD=n CONFIG_RCU_EXPERT=y CONFIG_RCU_EQS_DEBUG=y +CONFIG_RCU_LAZY=y From patchwork Wed Mar 15 23:54:50 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Boqun Feng X-Patchwork-Id: 13176793 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 vger.kernel.org (vger.kernel.org [23.128.96.18]) by smtp.lore.kernel.org (Postfix) with ESMTP id 10A84C7618B for ; Wed, 15 Mar 2023 23:55:33 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S233212AbjCOXzb (ORCPT ); Wed, 15 Mar 2023 19:55:31 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:34182 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S233191AbjCOXzY (ORCPT ); Wed, 15 Mar 2023 19:55:24 -0400 Received: from mail-qt1-x836.google.com (mail-qt1-x836.google.com [IPv6:2607:f8b0:4864:20::836]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 9FD5561536; Wed, 15 Mar 2023 16:55:15 -0700 (PDT) Received: by mail-qt1-x836.google.com with SMTP id r16so53879qtx.9; Wed, 15 Mar 2023 16:55:15 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20210112; t=1678924514; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:feedback-id:from:to:cc:subject :date:message-id:reply-to; bh=JaJV0W3JpTKcuvbp4OnNcGpM+ZfLpz31BXaPlTpOHes=; b=LwTIMY/691Ca2SxnUr999kk1iyHrVvNB2X4RoKGJ0l5dMghNHWFOMYCN9I0hcp5fSz j7cFVsxJlONl5cR85L/bt2ajTlEuijKwFuBwkgwBg9cJVtJQ74IFYExNo+LCGE/V6UGB okT4wuntfBEduzFjTNNkBdXOOERuJCCabbfiWasdP36r2JC+9wVlq7DvPY7O5bbK66yh dyzwRlLElJgGoYJQzEBdEVMp1NqQTh4yFINJR+aiFcXvrYHEVhwU8V/OP1TloYjwKXE1 ICuWdd9UCmf/6sFEAcb4kprJjMA7jm1UUAMcvSyZwKgDHDhqQ7zZR7l357gcjiME6gW9 7gBg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; t=1678924514; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:feedback-id:x-gm-message-state :from:to:cc:subject:date:message-id:reply-to; bh=JaJV0W3JpTKcuvbp4OnNcGpM+ZfLpz31BXaPlTpOHes=; b=qEWYT6BhNc7qb8ZSvPzOSmjlYut+lZoYVshGRqDfwWKzNiwy1fta4rkFb98pMOUtQq 5wEFtV9yAmZVE66sTf8c1qOtDdqhelycix/15eSLZxegkP1Y6JgbgUSGOGDd+kmS3V+j 0IK1D5/sCdn6aEgwFG/G7dXFLXF8KhZG04xHmIcmrMbDqOm3CtrG9Vxc2We786hQE6ND rS9YesZxAX34UcsXbZ38/RKhxm8WEzPz84+w8R2pT2XWCd+05BZJqlvZfnsbMDcE+Y+w y8wRgKFtmi5gGuEPnTkICyQMLHbkK55OCt/NVHSdHmfght2vgl5mlSJ+/0gotVcgCOui hYWA== X-Gm-Message-State: AO0yUKWNWJ6xd6yTM2fUNZbZhlOmdE4Bcl1HCj6O+0OqSHapziEnM+uT +k6Bt16AtLeeKwelFlRWHbI= X-Google-Smtp-Source: AK7set+bq9Fru+65rGY7BwCoLvKsiUQemXgyLiN3CLIR66H4yS3gnKeQyyf+auXz7XVyub9nNEyFOA== X-Received: by 2002:a05:622a:89:b0:3bf:cfa6:55a1 with SMTP id o9-20020a05622a008900b003bfcfa655a1mr3493806qtw.12.1678924514546; Wed, 15 Mar 2023 16:55:14 -0700 (PDT) Received: from auth2-smtp.messagingengine.com (auth2-smtp.messagingengine.com. [66.111.4.228]) by smtp.gmail.com with ESMTPSA id f8-20020ac81348000000b0039cc0fbdb61sm4639549qtj.53.2023.03.15.16.55.13 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 15 Mar 2023 16:55:14 -0700 (PDT) Received: from compute1.internal (compute1.nyi.internal [10.202.2.41]) by mailauth.nyi.internal (Postfix) with ESMTP id AE50027C0054; Wed, 15 Mar 2023 19:55:13 -0400 (EDT) Received: from mailfrontend1 ([10.202.2.162]) by compute1.internal (MEProxy); Wed, 15 Mar 2023 19:55:13 -0400 X-ME-Sender: X-ME-Received: X-ME-Proxy-Cause: gggruggvucftvghtrhhoucdtuddrgedvhedrvddvledgudehucetufdoteggodetrfdotf fvucfrrhhofhhilhgvmecuhfgrshhtofgrihhlpdfqfgfvpdfurfetoffkrfgpnffqhgen uceurghilhhouhhtmecufedttdenucesvcftvggtihhpihgvnhhtshculddquddttddmne cujfgurhephffvvefufffkofgjfhgggfestdekredtredttdenucfhrhhomhepuehoqhhu nhcuhfgvnhhguceosghoqhhunhdrfhgvnhhgsehgmhgrihhlrdgtohhmqeenucggtffrrg htthgvrhhnpeegleejiedthedvheeggfejveefjeejkefgveffieeujefhueeigfegueeh geeggfenucevlhhushhtvghrufhiiigvpedunecurfgrrhgrmhepmhgrihhlfhhrohhmpe gsohhquhhnodhmvghsmhhtphgruhhthhhpvghrshhonhgrlhhithihqdeiledvgeehtdei gedqudejjeekheehhedvqdgsohhquhhnrdhfvghngheppehgmhgrihhlrdgtohhmsehfih igmhgvrdhnrghmvg X-ME-Proxy: Feedback-ID: iad51458e:Fastmail Received: by mail.messagingengine.com (Postfix) with ESMTPA; Wed, 15 Mar 2023 19:55:13 -0400 (EDT) From: Boqun Feng To: rcu@vger.kernel.org Cc: Davidlohr Bueso , "Paul E. McKenney" , Josh Triplett , Frederic Weisbecker , Neeraj Upadhyay , Steven Rostedt , Mathieu Desnoyers , Lai Jiangshan , Joel Fernandes , Shuah Khan , Bhaskar Chowdhury , Boqun Feng , linux-kernel@vger.kernel.org, linux-kselftest@vger.kernel.org Subject: [PATCH rcu 4/8] tools: rcu: Add usage function and check for argument Date: Wed, 15 Mar 2023 16:54:50 -0700 Message-Id: <20230315235454.2993-5-boqun.feng@gmail.com> X-Mailer: git-send-email 2.39.2 In-Reply-To: <20230315235454.2993-1-boqun.feng@gmail.com> References: <20230315235454.2993-1-boqun.feng@gmail.com> MIME-Version: 1.0 Precedence: bulk List-ID: X-Mailing-List: rcu@vger.kernel.org From: Bhaskar Chowdhury This commit converts extract-stall.sh script's header comment to a usage() function, and adds an argument check. While in the area, make this script be executable. [ paulmck: Strength argument check, remove extraneous comment. ] Signed-off-by: Bhaskar Chowdhury Signed-off-by: Paul E. McKenney Signed-off-by: Boqun Feng --- tools/rcu/extract-stall.sh | 26 ++++++++++++++++++++------ 1 file changed, 20 insertions(+), 6 deletions(-) mode change 100644 => 100755 tools/rcu/extract-stall.sh diff --git a/tools/rcu/extract-stall.sh b/tools/rcu/extract-stall.sh old mode 100644 new mode 100755 index e565697c9f90..08a39ad44320 --- a/tools/rcu/extract-stall.sh +++ b/tools/rcu/extract-stall.sh @@ -1,11 +1,25 @@ #!/bin/sh # SPDX-License-Identifier: GPL-2.0+ -# -# Extract any RCU CPU stall warnings present in specified file. -# Filter out clocksource lines. Note that preceding-lines excludes the -# initial line of the stall warning but trailing-lines includes it. -# -# Usage: extract-stall.sh dmesg-file [ preceding-lines [ trailing-lines ] ] + +usage() { + echo Extract any RCU CPU stall warnings present in specified file. + echo Filter out clocksource lines. Note that preceding-lines excludes the + echo initial line of the stall warning but trailing-lines includes it. + echo + echo Usage: $(basename $0) dmesg-file [ preceding-lines [ trailing-lines ] ] + echo + echo Error: $1 +} + +# Terminate the script, if the argument is missing + +if test -f "$1" && test -r "$1" +then + : +else + usage "Console log file \"$1\" missing or unreadable." + exit 1 +fi echo $1 preceding_lines="${2-3}" From patchwork Wed Mar 15 23:54:51 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Boqun Feng X-Patchwork-Id: 13176794 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 vger.kernel.org (vger.kernel.org [23.128.96.18]) by smtp.lore.kernel.org (Postfix) with ESMTP id C8EE1C76195 for ; Wed, 15 Mar 2023 23:55:34 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S233315AbjCOXzc (ORCPT ); Wed, 15 Mar 2023 19:55:32 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:34274 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S233223AbjCOXz1 (ORCPT ); Wed, 15 Mar 2023 19:55:27 -0400 Received: from mail-qt1-x829.google.com (mail-qt1-x829.google.com [IPv6:2607:f8b0:4864:20::829]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id B2FFB5CECC; Wed, 15 Mar 2023 16:55:16 -0700 (PDT) Received: by mail-qt1-x829.google.com with SMTP id i24so65437qtm.6; Wed, 15 Mar 2023 16:55:16 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20210112; t=1678924516; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:feedback-id:from:to:cc:subject :date:message-id:reply-to; bh=H/g9hELla+E2WCiG57rQXta1ANtz3zbn27MBRyeXeek=; b=BtgUmZx1vp0Hv27lp/KNyeaecN/0NWwaGaeI3t4tR0IYc3ZryCcGe0M6e0QAYuz8nE r+jebOvyJ3rdOVJCVWZqNHCKx0FKhvTChfY6Vmg0B2hsGyy+iVwwbdHYj2i43mYBbo+m zyWGeckzwM9j261GTD8wP9OEC79kwd3cPCwIpHijlLceJx5uMPK5hPkhDO7/j55c5+6g nndOIxceyE7T3ZiIuT/JSfJXvnzXhDzAn/LZU6d+kd+Z2jAUPDR5zLcQs46nVg/gtNkx Lbsvz3aFpqlxQxLOpi6q2w+7vAUsuPHV7v0c1yMwARqS1jmM/lr1gTW7l/N3gZg/uszd UARw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; t=1678924516; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:feedback-id:x-gm-message-state :from:to:cc:subject:date:message-id:reply-to; bh=H/g9hELla+E2WCiG57rQXta1ANtz3zbn27MBRyeXeek=; b=CYc4bRbBhvQr2XIAZoz1aTHhOs9wCwC4zui1GwGpwNp9ug3k3gcJZ7iuJI8GEDSPMT Ys1+hnPCvWIyHKEReZcyQkWWV6Z6JJc1W2jt0TQdNaPQnZzPRVUa8esOhCOFIQXeaaEM 35Pu1JoYYJ7lhgKjCZ7GM7gwWaussAv+OymYPVcYzGQOAe6di/6z8rrFXw6G6fUhdOKz lVtHUzlhmzGSEbujozBU2/4LA3EnqB1U1kWr9LJX2k7jGiy54uBcOasxK/9I4xr30guA yp7BaWJGq3waKaNmHgrTp5oJrKKerWhzCyfi4aFElN9Pltv1M1ounq6Z9YjbSS7lMxZa ZIuA== X-Gm-Message-State: AO0yUKXsnQIr/TQ84kICZ2ZPeyQpWtiXdD/7d5zQo4keX8Mu4QJYFfN4 nQa2lmSQQDm4aWVJAboYJUNlB3fgPiU= X-Google-Smtp-Source: AK7set/E4rJbr7eKHqTf5BN+Mj+CB6owxZN5u/cB0dnRM4NqIu9VZC7UZRaMkhCp6+xM+/XXHRkDHw== X-Received: by 2002:a05:622a:1a25:b0:3b8:5057:377b with SMTP id f37-20020a05622a1a2500b003b85057377bmr3054365qtb.65.1678924515895; Wed, 15 Mar 2023 16:55:15 -0700 (PDT) Received: from auth2-smtp.messagingengine.com (auth2-smtp.messagingengine.com. [66.111.4.228]) by smtp.gmail.com with ESMTPSA id z9-20020ac86b89000000b003b9bb59543fsm4623645qts.61.2023.03.15.16.55.15 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 15 Mar 2023 16:55:15 -0700 (PDT) Received: from compute5.internal (compute5.nyi.internal [10.202.2.45]) by mailauth.nyi.internal (Postfix) with ESMTP id 018FB27C0054; Wed, 15 Mar 2023 19:55:15 -0400 (EDT) Received: from mailfrontend1 ([10.202.2.162]) by compute5.internal (MEProxy); Wed, 15 Mar 2023 19:55:15 -0400 X-ME-Sender: X-ME-Received: X-ME-Proxy-Cause: gggruggvucftvghtrhhoucdtuddrgedvhedrvddvledgudeiucetufdoteggodetrfdotf fvucfrrhhofhhilhgvmecuhfgrshhtofgrihhlpdfqfgfvpdfurfetoffkrfgpnffqhgen uceurghilhhouhhtmecufedttdenucesvcftvggtihhpihgvnhhtshculddquddttddmne cujfgurhephffvvefufffkofgjfhgggfestdekredtredttdenucfhrhhomhepuehoqhhu nhcuhfgvnhhguceosghoqhhunhdrfhgvnhhgsehgmhgrihhlrdgtohhmqeenucggtffrrg htthgvrhhnpeegleejiedthedvheeggfejveefjeejkefgveffieeujefhueeigfegueeh geeggfenucevlhhushhtvghrufhiiigvpedtnecurfgrrhgrmhepmhgrihhlfhhrohhmpe gsohhquhhnodhmvghsmhhtphgruhhthhhpvghrshhonhgrlhhithihqdeiledvgeehtdei gedqudejjeekheehhedvqdgsohhquhhnrdhfvghngheppehgmhgrihhlrdgtohhmsehfih igmhgvrdhnrghmvg X-ME-Proxy: Feedback-ID: iad51458e:Fastmail Received: by mail.messagingengine.com (Postfix) with ESMTPA; Wed, 15 Mar 2023 19:55:14 -0400 (EDT) From: Boqun Feng To: rcu@vger.kernel.org Cc: Davidlohr Bueso , "Paul E. McKenney" , Josh Triplett , Frederic Weisbecker , Neeraj Upadhyay , Steven Rostedt , Mathieu Desnoyers , Lai Jiangshan , Joel Fernandes , Shuah Khan , Bhaskar Chowdhury , Boqun Feng , linux-kernel@vger.kernel.org, linux-kselftest@vger.kernel.org Subject: [PATCH rcu 5/8] torture: Permit kvm-again.sh --duration to default to previous run Date: Wed, 15 Mar 2023 16:54:51 -0700 Message-Id: <20230315235454.2993-6-boqun.feng@gmail.com> X-Mailer: git-send-email 2.39.2 In-Reply-To: <20230315235454.2993-1-boqun.feng@gmail.com> References: <20230315235454.2993-1-boqun.feng@gmail.com> MIME-Version: 1.0 Precedence: bulk List-ID: X-Mailing-List: rcu@vger.kernel.org From: "Paul E. McKenney" Currently, invoking kvm-again.sh without a --duration argument results in a bash error message. This commit therefore adds quotes around the $dur argument to kvm-transform.sh to allow a default duration to be taken from the earlier run. Signed-off-by: Paul E. McKenney Signed-off-by: Boqun Feng --- tools/testing/selftests/rcutorture/bin/kvm-again.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/tools/testing/selftests/rcutorture/bin/kvm-again.sh b/tools/testing/selftests/rcutorture/bin/kvm-again.sh index 8a968fbda02c..88ca4e368489 100755 --- a/tools/testing/selftests/rcutorture/bin/kvm-again.sh +++ b/tools/testing/selftests/rcutorture/bin/kvm-again.sh @@ -193,7 +193,7 @@ do qemu_cmd_dir="`dirname "$i"`" kernel_dir="`echo $qemu_cmd_dir | sed -e 's/\.[0-9]\+$//'`" jitter_dir="`dirname "$kernel_dir"`" - kvm-transform.sh "$kernel_dir/bzImage" "$qemu_cmd_dir/console.log" "$jitter_dir" $dur "$bootargs" < $T/qemu-cmd > $i + kvm-transform.sh "$kernel_dir/bzImage" "$qemu_cmd_dir/console.log" "$jitter_dir" "$dur" "$bootargs" < $T/qemu-cmd > $i if test -n "$arg_remote" then echo "# TORTURE_KCONFIG_GDB_ARG=''" >> $i From patchwork Wed Mar 15 23:54:52 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Boqun Feng X-Patchwork-Id: 13176795 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 vger.kernel.org (vger.kernel.org [23.128.96.18]) by smtp.lore.kernel.org (Postfix) with ESMTP id 631BAC61DA4 for ; Wed, 15 Mar 2023 23:55:35 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S233324AbjCOXze (ORCPT ); Wed, 15 Mar 2023 19:55:34 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:34116 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S233251AbjCOXza (ORCPT ); Wed, 15 Mar 2023 19:55:30 -0400 Received: from mail-qt1-x836.google.com (mail-qt1-x836.google.com [IPv6:2607:f8b0:4864:20::836]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 9A1F35D77A; Wed, 15 Mar 2023 16:55:18 -0700 (PDT) Received: by mail-qt1-x836.google.com with SMTP id c19so38668qtn.13; Wed, 15 Mar 2023 16:55:18 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20210112; t=1678924517; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:feedback-id:from:to:cc:subject :date:message-id:reply-to; bh=5gFGRe+GR4tL6TIQSCOd5oG4daoxg1w8734Bp22SUG4=; b=fwDoMYTUnrr/6bpQUlS3ZXIm6xKdYnCT0KTjDsHJjimRd5fPusYUlOx1MQpIFGsvhl QsqHsmzjMoqSdacSUcZKFLQOVlUMyPuu+937Zt7h+a6rBUiQ9kWzuQBG5odvQmbc6Mf0 iIqDqwqUbOh/vIx/d94K3YsK+rOOBKalEJRDsl/LOFzVOqaSCud3CC7/ots3etcKSnLz I+Vt40XTE3TwfIVd3Va1Aol5H+FetbZ5OQsJliUit0mlDEatw7khbHb9BHT2pVJQuZJe 8tbk3d/R1zckMvD6Z6/GmcgSIj0R51QkkSkiZQ4iOvUq1fyEY27CVLcmq19dC3Y8h3mB 7xeQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; t=1678924517; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:feedback-id:x-gm-message-state :from:to:cc:subject:date:message-id:reply-to; bh=5gFGRe+GR4tL6TIQSCOd5oG4daoxg1w8734Bp22SUG4=; b=PBR14u87734qSuuwda8WBxQyvYUy0q8HZraDu+AnSNLMpae16Gd5FwfacCaw1ysh1C NHaDw+wBAY1y/ZpxPqNIx7Yu+VZXKEIP5VRKmhCI9g8ccKmgH/2W7LvD1oIJk+O+4qJj 8Hm3Y1L9BERKCRBP5s17Nn20xuQvr60lqHsURCW/A2UxR6VyvuMketnBFUOwz0IVmxBV 99M5/MerghWm2A4Nxv6gd7+9Ea/jV1G6HgHgV6xETonQQcjgKRJkjTg4x1JUM3xrGztS 7wuBosQZfq6kUEt4SrZd1Fh/lYrN6x5B89rWSWvVUyyfUXj0CR8q6MMdO5Pejyf53er5 hc0A== X-Gm-Message-State: AO0yUKWFuCZZPQZtMlrz4QK1/Gxor4/6YTeCSHR9XXyKLlexTxl4bqG2 CG4C+Dg0BBYZIywO65E2XXU= X-Google-Smtp-Source: AK7set+j1Nw0S9NpSL9eBIsKPAzHLa5p4exbKDP4SgzH+ASExp11FqDCVYg4XKo91GyOWzHsjLq1bw== X-Received: by 2002:a05:622a:1393:b0:3bf:dbb4:3bcc with SMTP id o19-20020a05622a139300b003bfdbb43bccmr3217063qtk.4.1678924517711; Wed, 15 Mar 2023 16:55:17 -0700 (PDT) Received: from auth2-smtp.messagingengine.com (auth2-smtp.messagingengine.com. [66.111.4.228]) by smtp.gmail.com with ESMTPSA id o7-20020a374107000000b00745c4d90aacsm4316401qka.115.2023.03.15.16.55.17 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 15 Mar 2023 16:55:17 -0700 (PDT) Received: from compute2.internal (compute2.nyi.internal [10.202.2.46]) by mailauth.nyi.internal (Postfix) with ESMTP id DC51927C0054; Wed, 15 Mar 2023 19:55:16 -0400 (EDT) Received: from mailfrontend1 ([10.202.2.162]) by compute2.internal (MEProxy); Wed, 15 Mar 2023 19:55:16 -0400 X-ME-Sender: X-ME-Received: X-ME-Proxy-Cause: gggruggvucftvghtrhhoucdtuddrgedvhedrvddvledgudehucetufdoteggodetrfdotf fvucfrrhhofhhilhgvmecuhfgrshhtofgrihhlpdfqfgfvpdfurfetoffkrfgpnffqhgen uceurghilhhouhhtmecufedttdenucesvcftvggtihhpihgvnhhtshculddquddttddmne cujfgurhephffvvefufffkofgjfhgggfestdekredtredttdenucfhrhhomhepuehoqhhu nhcuhfgvnhhguceosghoqhhunhdrfhgvnhhgsehgmhgrihhlrdgtohhmqeenucggtffrrg htthgvrhhnpeegleejiedthedvheeggfejveefjeejkefgveffieeujefhueeigfegueeh geeggfenucevlhhushhtvghrufhiiigvpedtnecurfgrrhgrmhepmhgrihhlfhhrohhmpe gsohhquhhnodhmvghsmhhtphgruhhthhhpvghrshhonhgrlhhithihqdeiledvgeehtdei gedqudejjeekheehhedvqdgsohhquhhnrdhfvghngheppehgmhgrihhlrdgtohhmsehfih igmhgvrdhnrghmvg X-ME-Proxy: Feedback-ID: iad51458e:Fastmail Received: by mail.messagingengine.com (Postfix) with ESMTPA; Wed, 15 Mar 2023 19:55:15 -0400 (EDT) From: Boqun Feng To: rcu@vger.kernel.org Cc: Davidlohr Bueso , "Paul E. McKenney" , Josh Triplett , Frederic Weisbecker , Neeraj Upadhyay , Steven Rostedt , Mathieu Desnoyers , Lai Jiangshan , Joel Fernandes , Shuah Khan , Bhaskar Chowdhury , Boqun Feng , linux-kernel@vger.kernel.org, linux-kselftest@vger.kernel.org, Yue Hu Subject: [PATCH rcu 6/8] rcutorture: Eliminate variable n_rcu_torture_boost_rterror Date: Wed, 15 Mar 2023 16:54:52 -0700 Message-Id: <20230315235454.2993-7-boqun.feng@gmail.com> X-Mailer: git-send-email 2.39.2 In-Reply-To: <20230315235454.2993-1-boqun.feng@gmail.com> References: <20230315235454.2993-1-boqun.feng@gmail.com> MIME-Version: 1.0 Precedence: bulk List-ID: X-Mailing-List: rcu@vger.kernel.org From: Yue Hu After commit 8b700983de82 ("sched: Remove sched_set_*() return value"), this variable is not used anymore. So eliminate it entirely. Signed-off-by: Yue Hu Signed-off-by: Paul E. McKenney Signed-off-by: Boqun Feng --- kernel/rcu/rcutorture.c | 11 +++-------- 1 file changed, 3 insertions(+), 8 deletions(-) diff --git a/kernel/rcu/rcutorture.c b/kernel/rcu/rcutorture.c index 480bba142e3a..c0b2fd687bbb 100644 --- a/kernel/rcu/rcutorture.c +++ b/kernel/rcu/rcutorture.c @@ -180,7 +180,6 @@ static atomic_t n_rcu_torture_mbchk_tries; static atomic_t n_rcu_torture_error; static long n_rcu_torture_barrier_error; static long n_rcu_torture_boost_ktrerror; -static long n_rcu_torture_boost_rterror; static long n_rcu_torture_boost_failure; static long n_rcu_torture_boosts; static atomic_long_t n_rcu_torture_timers; @@ -2195,12 +2194,11 @@ rcu_torture_stats_print(void) atomic_read(&n_rcu_torture_alloc), atomic_read(&n_rcu_torture_alloc_fail), atomic_read(&n_rcu_torture_free)); - pr_cont("rtmbe: %d rtmbkf: %d/%d rtbe: %ld rtbke: %ld rtbre: %ld ", + pr_cont("rtmbe: %d rtmbkf: %d/%d rtbe: %ld rtbke: %ld ", atomic_read(&n_rcu_torture_mberror), atomic_read(&n_rcu_torture_mbchk_fail), atomic_read(&n_rcu_torture_mbchk_tries), n_rcu_torture_barrier_error, - n_rcu_torture_boost_ktrerror, - n_rcu_torture_boost_rterror); + n_rcu_torture_boost_ktrerror); pr_cont("rtbf: %ld rtb: %ld nt: %ld ", n_rcu_torture_boost_failure, n_rcu_torture_boosts, @@ -2218,15 +2216,13 @@ rcu_torture_stats_print(void) if (atomic_read(&n_rcu_torture_mberror) || atomic_read(&n_rcu_torture_mbchk_fail) || n_rcu_torture_barrier_error || n_rcu_torture_boost_ktrerror || - n_rcu_torture_boost_rterror || n_rcu_torture_boost_failure || - i > 1) { + n_rcu_torture_boost_failure || i > 1) { pr_cont("%s", "!!! "); atomic_inc(&n_rcu_torture_error); WARN_ON_ONCE(atomic_read(&n_rcu_torture_mberror)); WARN_ON_ONCE(atomic_read(&n_rcu_torture_mbchk_fail)); WARN_ON_ONCE(n_rcu_torture_barrier_error); // rcu_barrier() WARN_ON_ONCE(n_rcu_torture_boost_ktrerror); // no boost kthread - WARN_ON_ONCE(n_rcu_torture_boost_rterror); // can't set RT prio WARN_ON_ONCE(n_rcu_torture_boost_failure); // boost failed (TIMER_SOFTIRQ RT prio?) WARN_ON_ONCE(i > 1); // Too-short grace period } @@ -3568,7 +3564,6 @@ rcu_torture_init(void) atomic_set(&n_rcu_torture_error, 0); n_rcu_torture_barrier_error = 0; n_rcu_torture_boost_ktrerror = 0; - n_rcu_torture_boost_rterror = 0; n_rcu_torture_boost_failure = 0; n_rcu_torture_boosts = 0; for (i = 0; i < RCU_TORTURE_PIPE_LEN + 1; i++) From patchwork Wed Mar 15 23:54:53 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Boqun Feng X-Patchwork-Id: 13176797 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 vger.kernel.org (vger.kernel.org [23.128.96.18]) by smtp.lore.kernel.org (Postfix) with ESMTP id A9DB9C7618B for ; Wed, 15 Mar 2023 23:55:41 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S233271AbjCOXzj (ORCPT ); Wed, 15 Mar 2023 19:55:39 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:34282 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S233282AbjCOXzb (ORCPT ); Wed, 15 Mar 2023 19:55:31 -0400 Received: from mail-qv1-xf2a.google.com (mail-qv1-xf2a.google.com [IPv6:2607:f8b0:4864:20::f2a]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id E4D595D44F; Wed, 15 Mar 2023 16:55:19 -0700 (PDT) Received: by mail-qv1-xf2a.google.com with SMTP id op8so178352qvb.11; Wed, 15 Mar 2023 16:55:19 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20210112; t=1678924519; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:feedback-id:from:to:cc:subject :date:message-id:reply-to; bh=7kufPj583zvhnR60hiZgolUHas9LXo1nZ8SV480VMsY=; b=cpAJaC25Bp1ha/2OvojWG2C45bYyNV5fmWZntXE0jktagtLR351+5tbxpMQlMSgjrl vNdoR+XIk3odEJc31Ek4XoWIUMG0Mppp3C3gyqiBrbpfv8arYcv6eU2pXpyQytGQE43Z i9lYWizr/DxCEjJRmApstq8UtQxBJAAepSFpNBU7vq6XRR7k9mABzAEqN3h6Za8jOJhs RAJPDhC8mr8CiWFE1y7wmM0/8kEzxok4vsc81m38m2Sm1LWJRErs1TUJCOiJphw1f4E9 QcyCo78WhvdgcZk2re6vtbOkq1gppJSKWUn5DBJI0KUSGDTufGH2NMNXDL3DfJ5zmNDQ 9gBg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; t=1678924519; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:feedback-id:x-gm-message-state :from:to:cc:subject:date:message-id:reply-to; bh=7kufPj583zvhnR60hiZgolUHas9LXo1nZ8SV480VMsY=; b=uBN4PvUoC2Z35OewU/PNcwh3JbL4MIli47Hyjmw19FSD2hER//9QjTJpvffzyFMbcC L6xXcsaftPcgPu6WS+ZwZToykAGSa0GZ68eZbdYSyWbUCskvGEAeYGUaPBKRtLNyQcF2 03lHfO6WTh2rZyJIJ/7YTWXAvSUbKpE9LV/8b85n6VJ3g9Ae+ptF2EwGyk3jooMVTOxl R8ikKCVNJF8Hpo+blZ/fzvi0GhbGtrMXfRpGwEYRMPiX4/uTc0e5BeUhEy3KKya6AE2u KupexRHQ6qzk12FAfFs/DJZIS1jzvsDyvnti765nxbXpPzfNEtpNdsvC/ydZ/Lk5p3vc rW+g== X-Gm-Message-State: AO0yUKV3E2WIGdfxVyAEQ8rSN7LfWNY066GqfLn5sfFiha1ft/vrnMsP K5T6YsoWS8i/NL3qfswQnRA= X-Google-Smtp-Source: AK7set9mREvmWhZCDaqo8/LGPzWwqupY9sAeDnU/kmW6/AgjUaoYmDc5I8jQkn1Txyg5skoYaD1bTw== X-Received: by 2002:a05:6214:2a87:b0:5ac:d489:9917 with SMTP id jr7-20020a0562142a8700b005acd4899917mr12174031qvb.23.1678924519095; Wed, 15 Mar 2023 16:55:19 -0700 (PDT) Received: from auth2-smtp.messagingengine.com (auth2-smtp.messagingengine.com. [66.111.4.228]) by smtp.gmail.com with ESMTPSA id s81-20020a374554000000b007417e60f621sm4740462qka.126.2023.03.15.16.55.18 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 15 Mar 2023 16:55:18 -0700 (PDT) Received: from compute4.internal (compute4.nyi.internal [10.202.2.44]) by mailauth.nyi.internal (Postfix) with ESMTP id 354FC27C0054; Wed, 15 Mar 2023 19:55:18 -0400 (EDT) Received: from mailfrontend1 ([10.202.2.162]) by compute4.internal (MEProxy); Wed, 15 Mar 2023 19:55:18 -0400 X-ME-Sender: X-ME-Received: X-ME-Proxy-Cause: gggruggvucftvghtrhhoucdtuddrgedvhedrvddvledgudeiucetufdoteggodetrfdotf fvucfrrhhofhhilhgvmecuhfgrshhtofgrihhlpdfqfgfvpdfurfetoffkrfgpnffqhgen uceurghilhhouhhtmecufedttdenucesvcftvggtihhpihgvnhhtshculddquddttddmne cujfgurhephffvvefufffkofgjfhgggfestdekredtredttdenucfhrhhomhepuehoqhhu nhcuhfgvnhhguceosghoqhhunhdrfhgvnhhgsehgmhgrihhlrdgtohhmqeenucggtffrrg htthgvrhhnpeegleejiedthedvheeggfejveefjeejkefgveffieeujefhueeigfegueeh geeggfenucevlhhushhtvghrufhiiigvpedvnecurfgrrhgrmhepmhgrihhlfhhrohhmpe gsohhquhhnodhmvghsmhhtphgruhhthhhpvghrshhonhgrlhhithihqdeiledvgeehtdei gedqudejjeekheehhedvqdgsohhquhhnrdhfvghngheppehgmhgrihhlrdgtohhmsehfih igmhgvrdhnrghmvg X-ME-Proxy: Feedback-ID: iad51458e:Fastmail Received: by mail.messagingengine.com (Postfix) with ESMTPA; Wed, 15 Mar 2023 19:55:17 -0400 (EDT) From: Boqun Feng To: rcu@vger.kernel.org Cc: Davidlohr Bueso , "Paul E. McKenney" , Josh Triplett , Frederic Weisbecker , Neeraj Upadhyay , Steven Rostedt , Mathieu Desnoyers , Lai Jiangshan , Joel Fernandes , Shuah Khan , Bhaskar Chowdhury , Boqun Feng , linux-kernel@vger.kernel.org, linux-kselftest@vger.kernel.org Subject: [PATCH rcu 7/8] torture: Enable clocksource watchdog with "tsc=watchdog" Date: Wed, 15 Mar 2023 16:54:53 -0700 Message-Id: <20230315235454.2993-8-boqun.feng@gmail.com> X-Mailer: git-send-email 2.39.2 In-Reply-To: <20230315235454.2993-1-boqun.feng@gmail.com> References: <20230315235454.2993-1-boqun.feng@gmail.com> MIME-Version: 1.0 Precedence: bulk List-ID: X-Mailing-List: rcu@vger.kernel.org From: "Paul E. McKenney" This commit tests the "tsc=watchdog" kernel boot parameter when running the clocksourcewd torture tests. Signed-off-by: Paul E. McKenney Signed-off-by: Boqun Feng --- tools/testing/selftests/rcutorture/bin/torture.sh | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/tools/testing/selftests/rcutorture/bin/torture.sh b/tools/testing/selftests/rcutorture/bin/torture.sh index 130d0de4c3bb..5a2ae2264403 100755 --- a/tools/testing/selftests/rcutorture/bin/torture.sh +++ b/tools/testing/selftests/rcutorture/bin/torture.sh @@ -497,16 +497,16 @@ fi if test "$do_clocksourcewd" = "yes" then - torture_bootargs="rcupdate.rcu_cpu_stall_suppress_at_boot=1 torture.disable_onoff_at_boot rcupdate.rcu_task_stall_timeout=30000" + torture_bootargs="rcupdate.rcu_cpu_stall_suppress_at_boot=1 torture.disable_onoff_at_boot rcupdate.rcu_task_stall_timeout=30000 tsc=watchdog" torture_set "clocksourcewd-1" tools/testing/selftests/rcutorture/bin/kvm.sh --allcpus --duration 45s --configs TREE03 --kconfig "CONFIG_TEST_CLOCKSOURCE_WATCHDOG=y" --trust-make - torture_bootargs="rcupdate.rcu_cpu_stall_suppress_at_boot=1 torture.disable_onoff_at_boot rcupdate.rcu_task_stall_timeout=30000 clocksource.max_cswd_read_retries=1" + torture_bootargs="rcupdate.rcu_cpu_stall_suppress_at_boot=1 torture.disable_onoff_at_boot rcupdate.rcu_task_stall_timeout=30000 clocksource.max_cswd_read_retries=1 tsc=watchdog" torture_set "clocksourcewd-2" tools/testing/selftests/rcutorture/bin/kvm.sh --allcpus --duration 45s --configs TREE03 --kconfig "CONFIG_TEST_CLOCKSOURCE_WATCHDOG=y" --trust-make # In case our work is already done... if test "$do_rcutorture" != "yes" then - torture_bootargs="rcupdate.rcu_cpu_stall_suppress_at_boot=1 torture.disable_onoff_at_boot rcupdate.rcu_task_stall_timeout=30000" + torture_bootargs="rcupdate.rcu_cpu_stall_suppress_at_boot=1 torture.disable_onoff_at_boot rcupdate.rcu_task_stall_timeout=30000 tsc=watchdog" torture_set "clocksourcewd-3" tools/testing/selftests/rcutorture/bin/kvm.sh --allcpus --duration 45s --configs TREE03 --trust-make fi fi From patchwork Wed Mar 15 23:54:54 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Boqun Feng X-Patchwork-Id: 13176796 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 vger.kernel.org (vger.kernel.org [23.128.96.18]) by smtp.lore.kernel.org (Postfix) with ESMTP id 33AD8C6FD1D for ; Wed, 15 Mar 2023 23:55:40 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S233191AbjCOXzi (ORCPT ); Wed, 15 Mar 2023 19:55:38 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:34494 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S233283AbjCOXzb (ORCPT ); Wed, 15 Mar 2023 19:55:31 -0400 Received: from mail-qt1-x832.google.com (mail-qt1-x832.google.com [IPv6:2607:f8b0:4864:20::832]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 7F74F6133C; Wed, 15 Mar 2023 16:55:21 -0700 (PDT) Received: by mail-qt1-x832.google.com with SMTP id s12so47047qtq.11; Wed, 15 Mar 2023 16:55:21 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20210112; t=1678924520; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:feedback-id:from:to:cc:subject :date:message-id:reply-to; bh=DQk4FNj9cOXKf/N0Z5hVCFZioIfls/69/wUewAHZC/M=; b=naU5Ws3oqw/MkLMhTrA04D/YEuE7vXr2frvrjxwvzMIRypxyWkaf0NSdXHEe9qN9kc YT2+u8/rRu3qhrKlBgOO1gTk/lK18DBMMzoC24sRbWnb3cKUxk92EHdJ0W1P6O/GXpUn zREX2zNcsl80me6KgGxAumFSIG6Ttq2H9guZKDOZWaVNeLnUCPIpbOrCPQgzoQlcAN6l UhYxqpU8WwkkTIziztibY0LZ6+A5Es91ps4ED6+7YLFMOmk1RW5vYhOk5OXkfWPtYQCL b8v2SzNqnEMOJNOkqVHuoJau5pmRkOu+gpXz3CNYsQXZM9wJ7TbpWZln71YjZTfSfk4Y ammg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; t=1678924520; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:feedback-id:x-gm-message-state :from:to:cc:subject:date:message-id:reply-to; bh=DQk4FNj9cOXKf/N0Z5hVCFZioIfls/69/wUewAHZC/M=; b=gP4URi8zDWGEbipDdXcMCiBwPOCrDdfL7+hpqxajy+LhBI0QogV7ihRvCyBT7/PSMv T8I9HEHoZtaOyAnbP4hSq9UqKS7tgHB0wV7YNqhdq54BWkbs/0Z3MQ98VII882kueTIf jQ7w0v5ZllKVovIaEeDBvx+Y30buhBlM0NiyrIf3CnhVvJw3qIS1WSI2kiPP3osqWJ+6 /9E3iqXm3/xqHq/qtHuV8MRQ8pBO0iz33FJRIqemc5FPr5q2furD3mjk0vFNPaMBEiCR QRw/byXxXNCVer58J0r/TFM+5jPzX2DjOWKbOnjVdQxxFEo0nm6SVd0cbmAbE7lHoFne PZtw== X-Gm-Message-State: AO0yUKWxWHAqx7uFuxq3+EoXIWZBC3dK7sSscxLVA9MpuTunGXECtvWp 2JkY0AfdyoCggN/lJmlhGNE= X-Google-Smtp-Source: AK7set9O7a5+ONaI894j9lnNQHVWEM2zEhOG7CQhyZ66os9aGL+8ntoiOIq00QTyD0ynhze3jxYEKA== X-Received: by 2002:ac8:57cd:0:b0:3b8:4951:57b8 with SMTP id w13-20020ac857cd000000b003b8495157b8mr3160892qta.15.1678924520385; Wed, 15 Mar 2023 16:55:20 -0700 (PDT) Received: from auth2-smtp.messagingengine.com (auth2-smtp.messagingengine.com. [66.111.4.228]) by smtp.gmail.com with ESMTPSA id x1-20020ac87ec1000000b003bfb6ddc49dsm4608990qtj.1.2023.03.15.16.55.19 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 15 Mar 2023 16:55:19 -0700 (PDT) Received: from compute1.internal (compute1.nyi.internal [10.202.2.41]) by mailauth.nyi.internal (Postfix) with ESMTP id 7FCE227C0054; Wed, 15 Mar 2023 19:55:19 -0400 (EDT) Received: from mailfrontend1 ([10.202.2.162]) by compute1.internal (MEProxy); Wed, 15 Mar 2023 19:55:19 -0400 X-ME-Sender: X-ME-Received: X-ME-Proxy-Cause: gggruggvucftvghtrhhoucdtuddrgedvhedrvddvledgudehucetufdoteggodetrfdotf fvucfrrhhofhhilhgvmecuhfgrshhtofgrihhlpdfqfgfvpdfurfetoffkrfgpnffqhgen uceurghilhhouhhtmecufedttdenucesvcftvggtihhpihgvnhhtshculddquddttddmne cujfgurhephffvvefufffkofgjfhgggfestdekredtredttdenucfhrhhomhepuehoqhhu nhcuhfgvnhhguceosghoqhhunhdrfhgvnhhgsehgmhgrihhlrdgtohhmqeenucggtffrrg htthgvrhhnpeegleejiedthedvheeggfejveefjeejkefgveffieeujefhueeigfegueeh geeggfenucevlhhushhtvghrufhiiigvpedvnecurfgrrhgrmhepmhgrihhlfhhrohhmpe gsohhquhhnodhmvghsmhhtphgruhhthhhpvghrshhonhgrlhhithihqdeiledvgeehtdei gedqudejjeekheehhedvqdgsohhquhhnrdhfvghngheppehgmhgrihhlrdgtohhmsehfih igmhgvrdhnrghmvg X-ME-Proxy: Feedback-ID: iad51458e:Fastmail Received: by mail.messagingengine.com (Postfix) with ESMTPA; Wed, 15 Mar 2023 19:55:19 -0400 (EDT) From: Boqun Feng To: rcu@vger.kernel.org Cc: Davidlohr Bueso , "Paul E. McKenney" , Josh Triplett , Frederic Weisbecker , Neeraj Upadhyay , Steven Rostedt , Mathieu Desnoyers , Lai Jiangshan , Joel Fernandes , Shuah Khan , Bhaskar Chowdhury , Boqun Feng , linux-kernel@vger.kernel.org, linux-kselftest@vger.kernel.org, Zqiang Subject: [PATCH rcu 8/8] rcutorture: Create nocb kthreads only when testing rcu in CONFIG_RCU_NOCB_CPU=y kernels Date: Wed, 15 Mar 2023 16:54:54 -0700 Message-Id: <20230315235454.2993-9-boqun.feng@gmail.com> X-Mailer: git-send-email 2.39.2 In-Reply-To: <20230315235454.2993-1-boqun.feng@gmail.com> References: <20230315235454.2993-1-boqun.feng@gmail.com> MIME-Version: 1.0 Precedence: bulk List-ID: X-Mailing-List: rcu@vger.kernel.org From: Zqiang Given a non-zero rcutorture.nocbs_nthreads module parameter, the specified number of nocb kthreads will be created, regardless of whether or not the RCU implementation under test is capable of offloading callbacks. Please note that even vanilla RCU is incapable of offloading in kernels built with CONFIG_RCU_NOCB_CPU=n. And when the RCU implementation is incapable of offloading callbacks, there is no point in creating those kthreads. This commit therefore checks the cur_ops.torture_type module parameter and CONFIG_RCU_NOCB_CPU Kconfig option in order to avoid creating unnecessary nocb tasks. Signed-off-by: Zqiang Reviewed-by: Joel Fernandes (Google) Signed-off-by: Paul E. McKenney Signed-off-by: Boqun Feng --- kernel/rcu/rcutorture.c | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/kernel/rcu/rcutorture.c b/kernel/rcu/rcutorture.c index c0b2fd687bbb..2d1c7e15cd72 100644 --- a/kernel/rcu/rcutorture.c +++ b/kernel/rcu/rcutorture.c @@ -3525,6 +3525,12 @@ rcu_torture_init(void) pr_alert("rcu-torture: ->fqs NULL and non-zero fqs_duration, fqs disabled.\n"); fqs_duration = 0; } + if (nocbs_nthreads != 0 && (cur_ops != &rcu_ops || + !IS_ENABLED(CONFIG_RCU_NOCB_CPU))) { + pr_alert("rcu-torture types: %s and CONFIG_RCU_NOCB_CPU=%d, nocb toggle disabled.\n", + cur_ops->name, IS_ENABLED(CONFIG_RCU_NOCB_CPU)); + nocbs_nthreads = 0; + } if (cur_ops->init) cur_ops->init();