From patchwork Thu Mar 23 04:39:26 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Boqun Feng X-Patchwork-Id: 13184958 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 18444C6FD1C for ; Thu, 23 Mar 2023 04:39:51 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S229794AbjCWEju (ORCPT ); Thu, 23 Mar 2023 00:39:50 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:42586 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229791AbjCWEjs (ORCPT ); Thu, 23 Mar 2023 00:39:48 -0400 Received: from mail-qt1-x831.google.com (mail-qt1-x831.google.com [IPv6:2607:f8b0:4864:20::831]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id ABD3725E31; Wed, 22 Mar 2023 21:39:47 -0700 (PDT) Received: by mail-qt1-x831.google.com with SMTP id n2so25402696qtp.0; Wed, 22 Mar 2023 21:39:47 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20210112; t=1679546387; 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=/p+415ml8u7S5uPVpzM3VN2d4OyiFzVETTNfWzjy5Xo=; b=NGLX5O2VPNV2Vnt0cER10ndlTTqJWc7KUZzNHQe9L11HC2alrY0+8K557PRdFRqrQz VdX+LrEq4JVau5EQ68B9aMhH+b+He9/ckXETRMdBRgH9fV089/4TKLV4oxW0W/8Egu+0 1zHQLSE/6uwN3Gkp6G8y0zbjNDeMM50rB12tLCsAkPN32yJQM4/t56ZJcmgtDdxdkVxO HZUk09ks+ZgGP4q2JsBcjrHXLqEXBLH0jE6hq4Be2Bal5RV/WJ9K/YdCjSaVBuVmziMV TFOJvLynNeiJy6XRTKhsxfSiJOG4GJS7Zk+kDiXqc3YrQJc78fXPCcnQIy3yS+v8B4EA S8kw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; t=1679546387; 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=/p+415ml8u7S5uPVpzM3VN2d4OyiFzVETTNfWzjy5Xo=; b=pPj0EhTsFpjvsIaIu/MLkCzCMhEqNWDNpuZJDXuHxyGz1mGJd0dKUxnNF8kFrEf0Ox jqHp32QVk0FsgmIYz1LPKsaVewHj1QbrvPPKseQrJbWVo/KylCKRTEvDny9dW8iVKxQz kME786Qb+JMsaoLLWY4uAluUZnokkCClNbGs1Vuu2LHmmG9292sT2qo/UdLGUkATfZ6x Vh9VJ/dtYot+bqiS0q+/jFoEc23IQ83NwxQ3igyXByHc7HVheMkDmf9a4+evS9Kbzov3 cX+8ye4lBBkZ0RBJr77gEA5xmolT761XRSmJIUe6dV99muJgN243fRc1HpfafvlcPs8D 2+NQ== X-Gm-Message-State: AO0yUKVfh+UWcbMbLDMo4Sxw5atRMr6Y/eWuQ2m/dOhn3LMHzCEh1ms8 7IwgvqOfrABPXuLo9FfFXq8= X-Google-Smtp-Source: AK7set/EcUr/+FKEfLEuRZwv5m/FvhcRXkjLqxNioPkgjR56iUuPcMeg26uh2htZ1w+H2yZ67OrfvA== X-Received: by 2002:a05:622a:199b:b0:3bf:ba1b:3615 with SMTP id u27-20020a05622a199b00b003bfba1b3615mr9833998qtc.55.1679546386815; Wed, 22 Mar 2023 21:39:46 -0700 (PDT) Received: from auth1-smtp.messagingengine.com (auth1-smtp.messagingengine.com. [66.111.4.227]) by smtp.gmail.com with ESMTPSA id g8-20020ac870c8000000b003e38ffab498sm1180040qtp.24.2023.03.22.21.39.46 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 22 Mar 2023 21:39:46 -0700 (PDT) Received: from compute6.internal (compute6.nyi.internal [10.202.2.47]) by mailauth.nyi.internal (Postfix) with ESMTP id EC5E927C0054; Thu, 23 Mar 2023 00:39:45 -0400 (EDT) Received: from mailfrontend2 ([10.202.2.163]) by compute6.internal (MEProxy); Thu, 23 Mar 2023 00:39:45 -0400 X-ME-Sender: X-ME-Received: X-ME-Proxy-Cause: gggruggvucftvghtrhhoucdtuddrgedvhedrvdegfedgjedvucetufdoteggodetrfdotf fvucfrrhhofhhilhgvmecuhfgrshhtofgrihhlpdfqfgfvpdfurfetoffkrfgpnffqhgen uceurghilhhouhhtmecufedttdenucesvcftvggtihhpihgvnhhtshculddquddttddmne cujfgurhephffvvefufffkofgjfhgggfestdekredtredttdenucfhrhhomhepuehoqhhu nhcuhfgvnhhguceosghoqhhunhdrfhgvnhhgsehgmhgrihhlrdgtohhmqeenucggtffrrg htthgvrhhnpeegleejiedthedvheeggfejveefjeejkefgveffieeujefhueeigfegueeh geeggfenucevlhhushhtvghrufhiiigvpedtnecurfgrrhgrmhepmhgrihhlfhhrohhmpe gsohhquhhnodhmvghsmhhtphgruhhthhhpvghrshhonhgrlhhithihqdeiledvgeehtdei gedqudejjeekheehhedvqdgsohhquhhnrdhfvghngheppehgmhgrihhlrdgtohhmsehfih igmhgvrdhnrghmvg X-ME-Proxy: Feedback-ID: iad51458e:Fastmail Received: by mail.messagingengine.com (Postfix) with ESMTPA; Thu, 23 Mar 2023 00:39:45 -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 v2 01/10] rcutorture: Add test_nmis module parameter Date: Wed, 22 Mar 2023 21:39:26 -0700 Message-Id: <20230323043935.1221184-2-boqun.feng@gmail.com> X-Mailer: git-send-email 2.38.1 In-Reply-To: <20230323043935.1221184-1-boqun.feng@gmail.com> References: <20230323043935.1221184-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 Thu Mar 23 04:39:27 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Boqun Feng X-Patchwork-Id: 13184959 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 4A272C6FD1C for ; Thu, 23 Mar 2023 04:39:59 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S230031AbjCWEj4 (ORCPT ); Thu, 23 Mar 2023 00:39:56 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:42616 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229875AbjCWEjv (ORCPT ); Thu, 23 Mar 2023 00:39:51 -0400 Received: from mail-qv1-xf33.google.com (mail-qv1-xf33.google.com [IPv6:2607:f8b0:4864:20::f33]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 4DD7A265A4; Wed, 22 Mar 2023 21:39:50 -0700 (PDT) Received: by mail-qv1-xf33.google.com with SMTP id o44so10594521qvo.4; Wed, 22 Mar 2023 21:39:50 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20210112; t=1679546389; 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=HZ8d0flphaRlWC4V9l6VSChxJlOrP32J2tV42hg3zmI=; b=WEZffOpSypUyM1PMJ6jeMYw2Uhn+XGytX/ZgSnaeTW3A5HmzMccRO/A8Uhgdi3fde1 Rz3EG5vBBEoTpdwa5/kxJfi1QsHGmJ2iX39k/5Pr+3vwTVeXW4BeSuyYx1QuWqCjrlaw +DhyxP+shEjh5Es5QicukvtDlmbv/TowWxBnkahQnHHm4s5NxsZRvE+SHZiCqwzdQEWi yxKbEpQQ9ikhr5zxBetxi4MBCd97s3IuRNjr1A9NJt0ZNoOJoVbnilhulIXRtjSx666e oRVBrZeMiJFHPwDIoh6fzSSYgTjwxBSwXjh/WCZ+wdYDhnH8OSXcBs7al7k6OD/wX/nX CFHA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; t=1679546389; 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=HZ8d0flphaRlWC4V9l6VSChxJlOrP32J2tV42hg3zmI=; b=KQiI7Z6T1/XMcD4iUocVGnM9zbTq4t52ZNvFIuQuLAE9EN/AzXpJr+1byRqVQh/aPb E3D5VVjdhJ+JosrOlAmnHcX3sHEOsc0mrr/zcF5JNb/BC/xQ1nzHEuz/ruoSMA9tdjVo M+uxDka5G/ocUSZ2OAr1ivnv64x4xJoqaGB1Ddt7AvOPexIb5xCpoJwCZaXpWCnx033O OWuQ1XPYSOGHP02l16/nrnE82Z7gUCqu0TPRGlByFREbJYsA/0UBsGociC8EvtsL39sL C3NjklbiMxRDiFEdvtpyZzYkd2CRasgvVLA+9CUDqtsEno8XtrGolPg8KaD+O+Ezb6cw /8GA== X-Gm-Message-State: AO0yUKUc57QusjtdWH+u3JA0S2uKDBrlUeZa3lKplrt8csyhLd94g3nT Y4UggPDDSl6dVd5ruKqZzTk= X-Google-Smtp-Source: AK7set/7u32PADWJOU5K3YLWfr92wgXwit3iahzDgPS6RggqAHZCqwCy/Rr24NqdQd6Jx9HNCKtX2g== X-Received: by 2002:a05:6214:c83:b0:5c0:ef32:5656 with SMTP id r3-20020a0562140c8300b005c0ef325656mr9257230qvr.11.1679546389458; Wed, 22 Mar 2023 21:39:49 -0700 (PDT) Received: from auth1-smtp.messagingengine.com (auth1-smtp.messagingengine.com. [66.111.4.227]) by smtp.gmail.com with ESMTPSA id p16-20020a05620a057000b00746476405bbsm12538338qkp.122.2023.03.22.21.39.48 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 22 Mar 2023 21:39:48 -0700 (PDT) Received: from compute3.internal (compute3.nyi.internal [10.202.2.43]) by mailauth.nyi.internal (Postfix) with ESMTP id 888BD27C0054; Thu, 23 Mar 2023 00:39:48 -0400 (EDT) Received: from mailfrontend1 ([10.202.2.162]) by compute3.internal (MEProxy); Thu, 23 Mar 2023 00:39:48 -0400 X-ME-Sender: X-ME-Received: X-ME-Proxy-Cause: gggruggvucftvghtrhhoucdtuddrgedvhedrvdegfedgjeduucetufdoteggodetrfdotf fvucfrrhhofhhilhgvmecuhfgrshhtofgrihhlpdfqfgfvpdfurfetoffkrfgpnffqhgen uceurghilhhouhhtmecufedttdenucesvcftvggtihhpihgvnhhtshculddquddttddmne cujfgurhephffvvefufffkofgjfhgggfestdekredtredttdenucfhrhhomhepuehoqhhu nhcuhfgvnhhguceosghoqhhunhdrfhgvnhhgsehgmhgrihhlrdgtohhmqeenucggtffrrg htthgvrhhnpeegleejiedthedvheeggfejveefjeejkefgveffieeujefhueeigfegueeh geeggfenucevlhhushhtvghrufhiiigvpedtnecurfgrrhgrmhepmhgrihhlfhhrohhmpe gsohhquhhnodhmvghsmhhtphgruhhthhhpvghrshhonhgrlhhithihqdeiledvgeehtdei gedqudejjeekheehhedvqdgsohhquhhnrdhfvghngheppehgmhgrihhlrdgtohhmsehfih igmhgvrdhnrghmvg X-ME-Proxy: Feedback-ID: iad51458e:Fastmail Received: by mail.messagingengine.com (Postfix) with ESMTPA; Thu, 23 Mar 2023 00:39:47 -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 v2 02/10] rcutorture: Set CONFIG_BOOTPARAM_HOTPLUG_CPU0 to offline CPU 0 Date: Wed, 22 Mar 2023 21:39:27 -0700 Message-Id: <20230323043935.1221184-3-boqun.feng@gmail.com> X-Mailer: git-send-email 2.38.1 In-Reply-To: <20230323043935.1221184-1-boqun.feng@gmail.com> References: <20230323043935.1221184-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 Thu Mar 23 04:39:28 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Boqun Feng X-Patchwork-Id: 13184960 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 1135AC761AF for ; Thu, 23 Mar 2023 04:40:00 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S230154AbjCWEj6 (ORCPT ); Thu, 23 Mar 2023 00:39:58 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:42722 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229955AbjCWEjx (ORCPT ); Thu, 23 Mar 2023 00:39:53 -0400 Received: from mail-qt1-x82d.google.com (mail-qt1-x82d.google.com [IPv6:2607:f8b0:4864:20::82d]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id AA574265AF; Wed, 22 Mar 2023 21:39:52 -0700 (PDT) Received: by mail-qt1-x82d.google.com with SMTP id r5so25349553qtp.4; Wed, 22 Mar 2023 21:39:52 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20210112; t=1679546392; 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=OHEXryW8drMs0szaO1SbdhWAn9gZ8trTjV5hBTe6O2Q=; b=hkNGZ94znl1tuzWRYVzw1ITnJEklP5Rilyus5lgsEeJYv9pjTKlqj+vx/i1gGr4YAL MYBEZUlx+PNELIljEjB/gNmLqHP4VOEu4+x+/yWAJ2eFCJkEIa+WdMUf8VUsAt6rEq/O mc+98VZY3sNI69GqnTyQxE45b+a0MQzo/sl5BUz6kASCryee90N36/PdeZ5IieXZ/I4s Mnwnju7baUkBW5dlg8lXTEkipKjwjufTcvejsbXjLYGLC8KtRRV3w2GTUyiGVJiUb6Hr OjZpCnsEpPKig7v3tikhwWEo+MHuPynKKhlBX+n5JDwSlQt16VgJHLhJjFe4/1jfKgPm 0Uyw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; t=1679546392; 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=OHEXryW8drMs0szaO1SbdhWAn9gZ8trTjV5hBTe6O2Q=; b=3Aj4uUNVciaWXxgvLHozL24CyvuBYcDT7pyMQ2eslabV4/qUeDCXjVk7jAJGaO3mkr 35b31oEJYBAPPbDChfWrWZeA8BiA681sFkIPvPzz6Wp9by5IEKT2U9jQJhOhadFDLPFG qaIaWSbGd/wIMuowgL+9uR2SaZjcNy+tZYEba6uD10gzpZ5EwkfiFUNuIzpD86c7aBCc wbpx3c4aGOAZHPj1Gr+hZ0k4Ampv5q52j+ZYWqo468g1aJ/5n/984Wb2HNUyW5PsZYPx XyV+TQpUo0vXCGF2eQpWBLHxSZsf8eVJKnXGP2vz+G5pVRCAKpBPlXYxEgXWZRjMGQb9 9uqQ== X-Gm-Message-State: AO0yUKVaqxAWiM3FkTnDZcghaE+9UAyDSbqdlhLti9aB2GCq7dD6M7/o D/yDDeOM4cdwEO4Sh1xpZDuLnHMUjHk= X-Google-Smtp-Source: AK7set9ScnnZsk4iSFw8V04MF1xA4UVeHWBx1+wVrolhhCa3R4olqMjh1MPTLTdqZSsRSg/C3+ZCAQ== X-Received: by 2002:ac8:5f4d:0:b0:3e3:87a2:e7f5 with SMTP id y13-20020ac85f4d000000b003e387a2e7f5mr9952384qta.11.1679546391823; Wed, 22 Mar 2023 21:39:51 -0700 (PDT) Received: from auth1-smtp.messagingengine.com (auth1-smtp.messagingengine.com. [66.111.4.227]) by smtp.gmail.com with ESMTPSA id f6-20020ac84986000000b003e38f7e4562sm1316017qtq.69.2023.03.22.21.39.51 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 22 Mar 2023 21:39:51 -0700 (PDT) Received: from compute2.internal (compute2.nyi.internal [10.202.2.46]) by mailauth.nyi.internal (Postfix) with ESMTP id EC53A27C0054; Thu, 23 Mar 2023 00:39:50 -0400 (EDT) Received: from mailfrontend2 ([10.202.2.163]) by compute2.internal (MEProxy); Thu, 23 Mar 2023 00:39:50 -0400 X-ME-Sender: X-ME-Received: X-ME-Proxy-Cause: gggruggvucftvghtrhhoucdtuddrgedvhedrvdegfedgjeduucetufdoteggodetrfdotf fvucfrrhhofhhilhgvmecuhfgrshhtofgrihhlpdfqfgfvpdfurfetoffkrfgpnffqhgen uceurghilhhouhhtmecufedttdenucesvcftvggtihhpihgvnhhtshculddquddttddmne cujfgurhephffvvefufffkofgjfhgggfestdekredtredttdenucfhrhhomhepuehoqhhu nhcuhfgvnhhguceosghoqhhunhdrfhgvnhhgsehgmhgrihhlrdgtohhmqeenucggtffrrg htthgvrhhnpeegleejiedthedvheeggfejveefjeejkefgveffieeujefhueeigfegueeh geeggfenucevlhhushhtvghrufhiiigvpedtnecurfgrrhgrmhepmhgrihhlfhhrohhmpe gsohhquhhnodhmvghsmhhtphgruhhthhhpvghrshhonhgrlhhithihqdeiledvgeehtdei gedqudejjeekheehhedvqdgsohhquhhnrdhfvghngheppehgmhgrihhlrdgtohhmsehfih igmhgvrdhnrghmvg X-ME-Proxy: Feedback-ID: iad51458e:Fastmail Received: by mail.messagingengine.com (Postfix) with ESMTPA; Thu, 23 Mar 2023 00:39:50 -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 v2 03/10] rcutorture: Make scenario TREE04 enable lazy call_rcu() Date: Wed, 22 Mar 2023 21:39:28 -0700 Message-Id: <20230323043935.1221184-4-boqun.feng@gmail.com> X-Mailer: git-send-email 2.38.1 In-Reply-To: <20230323043935.1221184-1-boqun.feng@gmail.com> References: <20230323043935.1221184-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 Thu Mar 23 04:39:29 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Boqun Feng X-Patchwork-Id: 13184961 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 4CAA1C6FD1C for ; Thu, 23 Mar 2023 04:40:10 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S230185AbjCWEkI (ORCPT ); Thu, 23 Mar 2023 00:40:08 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:42938 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S230078AbjCWEj5 (ORCPT ); Thu, 23 Mar 2023 00:39:57 -0400 Received: from mail-qv1-xf2d.google.com (mail-qv1-xf2d.google.com [IPv6:2607:f8b0:4864:20::f2d]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 76EFB26864; Wed, 22 Mar 2023 21:39:55 -0700 (PDT) Received: by mail-qv1-xf2d.google.com with SMTP id q88so7235613qvq.13; Wed, 22 Mar 2023 21:39:55 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20210112; t=1679546394; 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=rpd6Nuq+zKvvgRPPpUZyvF1zFoaLkJFZfbVONMKqf1k=; b=ZtUacI0K1D1dkHPegq3R0xQXH5D6iYly/yNMtSCqRLSggNjIaNCO+DrMYdCMROZHor 30SUFRWDYr9ZPwjDWEfN/WMS0xfgQjHPfMFgag1qEUEL3JwMptZfhl0P9t8fVXwl4Ufp Begvrh8V6tpCZnMYR9TUOnSBWdkO9HIVW1IQrLFO04cfmqwte2/x/lOKZj//owgI8heW T9EP6QSfexXoK79ECQzFknv9CzwKtlLifKXoOPrF0BahMmayK66jgCy0DW4uYjbtR9+H ezIpeHjN9m1qnr4auK3dznk/6wbk4y9sx2KohpReWGrPQjuJ+EG6B2q3ovDcoWD6Agdq YshQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; t=1679546394; 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=rpd6Nuq+zKvvgRPPpUZyvF1zFoaLkJFZfbVONMKqf1k=; b=i+gRrA+MHHukRh9LW9r/Bp8QSWYXkOUZJwJiRQJuhxwcrJLhK7/I38d1+FRDtmTwq8 LVS98/nX6NEQwYS0JkbxQ9HA29g/fmYcS0Dr9jQ1LzQ9aapRZVGkhNVyM/p/Dy7T1cLM +iYDGXDaoyNaVETjzozQCaojqDown6tJ/Ygx9jrBiAlLDWHhD/y/j43nxFIA/T83gV/9 wX+En8cgkOd27N+OGa4OGNLzTDB3gxrQ+U7EYxswRJCgSylrBeLXpAmQNOB0kZqtLjwz v61SvxIxwTu68tgDJ0CROkDI0slATmaYaBI2bKlce+7wBhn53it5gQdUJLuyRM1RmvHA bmjw== X-Gm-Message-State: AO0yUKWJUINja/ZELfprwp1yNHNChyC9AUYE0zY7j3el3IyBT4Z8M3dy c+FlHvxQR+/svsRip6tAIWY= X-Google-Smtp-Source: AK7set8X41D30DAr+Mb9Do//dk5O1nr2/Nkp0CUzIqGv3Ethb83zt+v3g7TV9csGvp2sp/I3EaRAjw== X-Received: by 2002:ad4:5d6c:0:b0:5ac:daf1:1ac1 with SMTP id fn12-20020ad45d6c000000b005acdaf11ac1mr10613633qvb.27.1679546394531; Wed, 22 Mar 2023 21:39:54 -0700 (PDT) Received: from auth1-smtp.messagingengine.com (auth1-smtp.messagingengine.com. [66.111.4.227]) by smtp.gmail.com with ESMTPSA id w2-20020ac87182000000b003b9a6d54b6csm11121127qto.59.2023.03.22.21.39.53 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 22 Mar 2023 21:39:54 -0700 (PDT) Received: from compute2.internal (compute2.nyi.internal [10.202.2.46]) by mailauth.nyi.internal (Postfix) with ESMTP id A905A27C0054; Thu, 23 Mar 2023 00:39:53 -0400 (EDT) Received: from mailfrontend2 ([10.202.2.163]) by compute2.internal (MEProxy); Thu, 23 Mar 2023 00:39:53 -0400 X-ME-Sender: X-ME-Received: X-ME-Proxy-Cause: gggruggvucftvghtrhhoucdtuddrgedvhedrvdegfedgjeduucetufdoteggodetrfdotf fvucfrrhhofhhilhgvmecuhfgrshhtofgrihhlpdfqfgfvpdfurfetoffkrfgpnffqhgen uceurghilhhouhhtmecufedttdenucesvcftvggtihhpihgvnhhtshculddquddttddmne cujfgurhephffvvefufffkofgjfhgggfestdekredtredttdenucfhrhhomhepuehoqhhu nhcuhfgvnhhguceosghoqhhunhdrfhgvnhhgsehgmhgrihhlrdgtohhmqeenucggtffrrg htthgvrhhnpeegleejiedthedvheeggfejveefjeejkefgveffieeujefhueeigfegueeh geeggfenucevlhhushhtvghrufhiiigvpedunecurfgrrhgrmhepmhgrihhlfhhrohhmpe gsohhquhhnodhmvghsmhhtphgruhhthhhpvghrshhonhgrlhhithihqdeiledvgeehtdei gedqudejjeekheehhedvqdgsohhquhhnrdhfvghngheppehgmhgrihhlrdgtohhmsehfih igmhgvrdhnrghmvg X-ME-Proxy: Feedback-ID: iad51458e:Fastmail Received: by mail.messagingengine.com (Postfix) with ESMTPA; Thu, 23 Mar 2023 00:39:52 -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 v2 04/10] tools: rcu: Add usage function and check for argument Date: Wed, 22 Mar 2023 21:39:29 -0700 Message-Id: <20230323043935.1221184-5-boqun.feng@gmail.com> X-Mailer: git-send-email 2.38.1 In-Reply-To: <20230323043935.1221184-1-boqun.feng@gmail.com> References: <20230323043935.1221184-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 Thu Mar 23 04:39:30 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Boqun Feng X-Patchwork-Id: 13184962 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 11D83C6FD1C for ; Thu, 23 Mar 2023 04:40:14 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S230163AbjCWEkL (ORCPT ); Thu, 23 Mar 2023 00:40:11 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:42908 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229990AbjCWEj7 (ORCPT ); Thu, 23 Mar 2023 00:39:59 -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 D9D0B2E0E0; Wed, 22 Mar 2023 21:39:57 -0700 (PDT) Received: by mail-qt1-x82b.google.com with SMTP id c19so25336051qtn.13; Wed, 22 Mar 2023 21:39:57 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20210112; t=1679546397; 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=FaC6lqA1+hxWMZLXGdossnkQMCIwT3AyBFn6G9k2cMY=; b=IP4pHIWCbnsnOYl4aeV7YcOd/2QwmpsonTQ/gl7XuwNELdEVtwBJn4PCOa/FWybMgj wY0N4keqvI4Eeil3vYjnVtyYeBKcmSW+ZW8A54HtHObwAtnFanuujza9pwfsrPo/UlAb cVfh04+Gee8guyvuogKtYVyoBXd7ijYLvH9uTxigkqQTnfjDQJSUEmVjvxNcEZRu5gjc O8nUyai42wAVWxyHxuQDU3rGA8uzYv9WmyGYDWwCAzY1xF8/OV8F/KUtL9J16RR7OK2E dR8CnxwpGGHxp5ol07czTYUo4ydf5pB2fgxnrbjYF+DcBO1/x7TdGRbX07LykNnuYkSv ZPNw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; t=1679546397; 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=FaC6lqA1+hxWMZLXGdossnkQMCIwT3AyBFn6G9k2cMY=; b=5VdHHX63ouP9l2ozY+EQdSiO+R/uLh8UgElNjSiE2jslj9mH6D79HBZGvCsasSSt3u fE6PdhFp+0PA97wt3PZY4NI5NBgp1ZKeAuA9mZA/QfgGD8aATHz1aGNwoM8wn/08cOSb 2Id10heC0wy5QYFuCIPqR/j80ZqavidjyzSOPiek2PYlwxH0JA34FLgpM/OJYSbqrrUy nJ5nwAUf6bvyWd52rLgQ2VX85Z1VJs0POxiiR2b2ot+F40W8jzkNnA8+tGlMrcJnUV3K gGQRJPV0uGbEYpkRmoNjRzRYtldcsnYpTi0UemhrIbWuKRKidlczI8IqdP8+L1wubZKt 5Abw== X-Gm-Message-State: AO0yUKWPcp0go2LdbKBER8cwvYJNefse77i1xxAzfaFwU3yxCkDiSIxh ClT8nlTuSxePzrpvYxj1/g8= X-Google-Smtp-Source: AK7set8sLlZ2FlsgD+ZSbzQxo9XvxL5NladA4oW+LOLYQCy1rJY8S90NIoBFESc11gL1hkC57VanhQ== X-Received: by 2002:a05:622a:14cb:b0:3e1:6c7e:2ee0 with SMTP id u11-20020a05622a14cb00b003e16c7e2ee0mr8115671qtx.11.1679546397061; Wed, 22 Mar 2023 21:39:57 -0700 (PDT) Received: from auth1-smtp.messagingengine.com (auth1-smtp.messagingengine.com. [66.111.4.227]) by smtp.gmail.com with ESMTPSA id b15-20020ac86bcf000000b003e393119035sm275042qtt.19.2023.03.22.21.39.56 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 22 Mar 2023 21:39:56 -0700 (PDT) Received: from compute3.internal (compute3.nyi.internal [10.202.2.43]) by mailauth.nyi.internal (Postfix) with ESMTP id 3186427C0054; Thu, 23 Mar 2023 00:39:56 -0400 (EDT) Received: from mailfrontend1 ([10.202.2.162]) by compute3.internal (MEProxy); Thu, 23 Mar 2023 00:39:56 -0400 X-ME-Sender: X-ME-Received: X-ME-Proxy-Cause: gggruggvucftvghtrhhoucdtuddrgedvhedrvdegfedgjeduucetufdoteggodetrfdotf fvucfrrhhofhhilhgvmecuhfgrshhtofgrihhlpdfqfgfvpdfurfetoffkrfgpnffqhgen uceurghilhhouhhtmecufedttdenucesvcftvggtihhpihgvnhhtshculddquddttddmne cujfgurhephffvvefufffkofgjfhgggfestdekredtredttdenucfhrhhomhepuehoqhhu nhcuhfgvnhhguceosghoqhhunhdrfhgvnhhgsehgmhgrihhlrdgtohhmqeenucggtffrrg htthgvrhhnpeegleejiedthedvheeggfejveefjeejkefgveffieeujefhueeigfegueeh geeggfenucevlhhushhtvghrufhiiigvpedunecurfgrrhgrmhepmhgrihhlfhhrohhmpe gsohhquhhnodhmvghsmhhtphgruhhthhhpvghrshhonhgrlhhithihqdeiledvgeehtdei gedqudejjeekheehhedvqdgsohhquhhnrdhfvghngheppehgmhgrihhlrdgtohhmsehfih igmhgvrdhnrghmvg X-ME-Proxy: Feedback-ID: iad51458e:Fastmail Received: by mail.messagingengine.com (Postfix) with ESMTPA; Thu, 23 Mar 2023 00:39:55 -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 v2 05/10] torture: Permit kvm-again.sh --duration to default to previous run Date: Wed, 22 Mar 2023 21:39:30 -0700 Message-Id: <20230323043935.1221184-6-boqun.feng@gmail.com> X-Mailer: git-send-email 2.38.1 In-Reply-To: <20230323043935.1221184-1-boqun.feng@gmail.com> References: <20230323043935.1221184-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 Thu Mar 23 04:39:31 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Boqun Feng X-Patchwork-Id: 13184963 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 A8624C6FD1C for ; Thu, 23 Mar 2023 04:40:25 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S230293AbjCWEkY (ORCPT ); Thu, 23 Mar 2023 00:40:24 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:42850 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S230115AbjCWEkJ (ORCPT ); Thu, 23 Mar 2023 00:40:09 -0400 Received: from mail-qv1-xf34.google.com (mail-qv1-xf34.google.com [IPv6:2607:f8b0:4864:20::f34]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 4B2BA301A3; Wed, 22 Mar 2023 21:40:01 -0700 (PDT) Received: by mail-qv1-xf34.google.com with SMTP id g9so13496797qvt.8; Wed, 22 Mar 2023 21:40:01 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20210112; t=1679546400; 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=aUFQW2WXfALj5ukiFKzp1+R094NGU0po6rD/6mapsrg=; b=jDJiw3NRGRoZ8yCkpG6dGJRFBmfjolxzWq88TSJIS9oKnz6k4wUYy2ldo3c5qmrl+G xbJsqsQ3c1V0bwg0dH2EZqMIraabjTqx1/diTTiILetOfxjE6GnqogGCRIm4hyyQXS59 ORXtlrZBU6CBDF0FJFUIAgbvFSz7zUn2lO7tROAfr73xYnA8jrX3yPZa4OeI1D4YsadC R5wWRvUDPkWqWg0XeZDldkUfPn5p1Vu0qj8IOFsclC7ENCIMvhDX3jAERU7rDZxafx2E aPVLK7501fRBqSkh8/GM1REEC6ZVye57Jkfb0DBKE1MqHgyEtDh0llVU9kwj2QEpUfnP icfQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; t=1679546400; 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=aUFQW2WXfALj5ukiFKzp1+R094NGU0po6rD/6mapsrg=; b=uTyDIpeJNvE2Fk5uX7+kZJ2nzb2CtuXoQyXJ54HkvyysqlHbJvLeI+moZFH48ZVFGn Mdwp3bRkQR/gVDivLfFlLeOuSxP6T/m1ZRpMEqRwkeNIo8mOZp8CGfB3UQawVo6vZ0hw o/gRfdpECh6+yjKDT3TQzrsv+6i2jweCfscNLIrp61L29re2Ko9F/ZG70R/4j191u+Lr H7wJQ3yDs0xJmwTYCmC2sDI2ROcgY7ZkuR2i8USnPE6Ol9WsOJuQcuEjVLJYeXckdreM mcmibu4wFQ0a3JtrCvS1qjtUbHvxNnQ/kWHsViprkaTyYxa4TW8h0OEc8B8FusT+I5qA K8cA== X-Gm-Message-State: AO0yUKXBeTISBd5+tXokACVcLXBJVAxKJYpOLcaraqWmU3OK8eURFnZx tUqeulPMz+ozcTFYHDDyxRw= X-Google-Smtp-Source: AK7set9PyFnnQnHZWuo4g26FzqCYMNznAv9GgNPBG2DH6WZhC7DKCTdyCH955LDl5Y/+n0sMg3hUoQ== X-Received: by 2002:a05:6214:29c7:b0:5a3:2e65:69ef with SMTP id gh7-20020a05621429c700b005a32e6569efmr10424559qvb.49.1679546400031; Wed, 22 Mar 2023 21:40:00 -0700 (PDT) Received: from auth1-smtp.messagingengine.com (auth1-smtp.messagingengine.com. [66.111.4.227]) by smtp.gmail.com with ESMTPSA id j185-20020a37b9c2000000b007465ad44891sm11548353qkf.102.2023.03.22.21.39.59 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 22 Mar 2023 21:39:59 -0700 (PDT) Received: from compute1.internal (compute1.nyi.internal [10.202.2.41]) by mailauth.nyi.internal (Postfix) with ESMTP id 1D2BF27C0054; Thu, 23 Mar 2023 00:39:59 -0400 (EDT) Received: from mailfrontend1 ([10.202.2.162]) by compute1.internal (MEProxy); Thu, 23 Mar 2023 00:39:59 -0400 X-ME-Sender: X-ME-Received: X-ME-Proxy-Cause: gggruggvucftvghtrhhoucdtuddrgedvhedrvdegfedgjeduucetufdoteggodetrfdotf fvucfrrhhofhhilhgvmecuhfgrshhtofgrihhlpdfqfgfvpdfurfetoffkrfgpnffqhgen uceurghilhhouhhtmecufedttdenucesvcftvggtihhpihgvnhhtshculddquddttddmne cujfgurhephffvvefufffkofgjfhgggfestdekredtredttdenucfhrhhomhepuehoqhhu nhcuhfgvnhhguceosghoqhhunhdrfhgvnhhgsehgmhgrihhlrdgtohhmqeenucggtffrrg htthgvrhhnpeegleejiedthedvheeggfejveefjeejkefgveffieeujefhueeigfegueeh geeggfenucevlhhushhtvghrufhiiigvpedtnecurfgrrhgrmhepmhgrihhlfhhrohhmpe gsohhquhhnodhmvghsmhhtphgruhhthhhpvghrshhonhgrlhhithihqdeiledvgeehtdei gedqudejjeekheehhedvqdgsohhquhhnrdhfvghngheppehgmhgrihhlrdgtohhmsehfih igmhgvrdhnrghmvg X-ME-Proxy: Feedback-ID: iad51458e:Fastmail Received: by mail.messagingengine.com (Postfix) with ESMTPA; Thu, 23 Mar 2023 00:39:57 -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 v2 06/10] rcutorture: Eliminate variable n_rcu_torture_boost_rterror Date: Wed, 22 Mar 2023 21:39:31 -0700 Message-Id: <20230323043935.1221184-7-boqun.feng@gmail.com> X-Mailer: git-send-email 2.38.1 In-Reply-To: <20230323043935.1221184-1-boqun.feng@gmail.com> References: <20230323043935.1221184-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 Thu Mar 23 04:39:32 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Boqun Feng X-Patchwork-Id: 13184964 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 EDB9DC6FD1D for ; Thu, 23 Mar 2023 04:40:38 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S230371AbjCWEkh (ORCPT ); Thu, 23 Mar 2023 00:40:37 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:43368 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S230172AbjCWEkW (ORCPT ); Thu, 23 Mar 2023 00:40:22 -0400 Received: from mail-qt1-x82d.google.com (mail-qt1-x82d.google.com [IPv6:2607:f8b0:4864:20::82d]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 85FB42FCDD; Wed, 22 Mar 2023 21:40:03 -0700 (PDT) Received: by mail-qt1-x82d.google.com with SMTP id a5so3718265qto.6; Wed, 22 Mar 2023 21:40:03 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20210112; t=1679546402; 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=CGpQAXZVjMhC7kP9GPuObfvBShBYQkr0qGROK59RoVs=; b=jGfdDGr6o66P0ZTe/setYhulypl773heym5C69xfz8sTi/mKBPui6Cy5CZsFlNN3ww yLuGjG8eJuW/EJRJAw/EAuGsl0oYMA/b6cdDAPb83zxPyCeBPWWB7FwCAqQNh+QeNglg tt9EU/WWonKA9zySZAFeLOF8Q7aFl91H7y3BncIXxhGI4I90WrDKeLYN//98sx2encGb B45hYw+y39M2B4K5RYfn+12UMMAgZ7p92jqCcEYgeS0Ssld7ECh685OMlKuh4A5yJOst MOyfKgL/GrmlFkM6p1yJqSjg3FgUWBS0/6r6Kj/urRhC/AojGVrLg9JqBcm1SjqN7RXv 57Nw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; t=1679546402; 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=CGpQAXZVjMhC7kP9GPuObfvBShBYQkr0qGROK59RoVs=; b=vbGxK2cdE+P4ZqAvRQgd0QCg0gSRsUtfireq/as8LSmRZcyX/2kKrCMDPphjxZcrSB rlGmCBeOU4HAuZM9KA5ydbOOQSZe/fNFlbEPRHhaZagi6FbBhA/7lT1iQf6AI8Sc1fBI 7JBk379VVRrFxNnunCobiAo9sOZ+QZXNf0G2om3Ou+GBt1tgFmepqvI05yaiqNe78DUI Ho4caprrCOZvdatrMG+tOoiZ/EdXAU7j82ILMPQOzoo8kPZOFVtFzAgsCxoi2bDc4H7x 44FVTsQTeW3dIlGUapFRB5a9wLVgjxoZ2SERm1C/0z1rbb36Fu5jskK9NTU1miUAjSVw e6Xg== X-Gm-Message-State: AO0yUKW19abzCVmk1iQijJYtQYTaSenbHVuFZfZkBZLIkcd0i2CUa7Cp o2CbUZsNKefEYAi9Kfojnqg= X-Google-Smtp-Source: AK7set+TEfFRcdSv3QphXR44M1CcWSsupF9rJ0eyjJOFYrCKfAhrMZ9aVnWwjAXbjzpyla01zF5AZg== X-Received: by 2002:a05:622a:1a16:b0:3b9:c889:ec24 with SMTP id f22-20020a05622a1a1600b003b9c889ec24mr10400507qtb.12.1679546402682; Wed, 22 Mar 2023 21:40:02 -0700 (PDT) Received: from auth1-smtp.messagingengine.com (auth1-smtp.messagingengine.com. [66.111.4.227]) by smtp.gmail.com with ESMTPSA id w9-20020ac843c9000000b003d8f78b82besm3763003qtn.70.2023.03.22.21.40.01 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 22 Mar 2023 21:40:02 -0700 (PDT) Received: from compute4.internal (compute4.nyi.internal [10.202.2.44]) by mailauth.nyi.internal (Postfix) with ESMTP id C0F4627C0054; Thu, 23 Mar 2023 00:40:01 -0400 (EDT) Received: from mailfrontend1 ([10.202.2.162]) by compute4.internal (MEProxy); Thu, 23 Mar 2023 00:40:01 -0400 X-ME-Sender: X-ME-Received: X-ME-Proxy-Cause: gggruggvucftvghtrhhoucdtuddrgedvhedrvdegfedgjedvucetufdoteggodetrfdotf fvucfrrhhofhhilhgvmecuhfgrshhtofgrihhlpdfqfgfvpdfurfetoffkrfgpnffqhgen uceurghilhhouhhtmecufedttdenucesvcftvggtihhpihgvnhhtshculddquddttddmne cujfgurhephffvvefufffkofgjfhgggfestdekredtredttdenucfhrhhomhepuehoqhhu nhcuhfgvnhhguceosghoqhhunhdrfhgvnhhgsehgmhgrihhlrdgtohhmqeenucggtffrrg htthgvrhhnpeegleejiedthedvheeggfejveefjeejkefgveffieeujefhueeigfegueeh geeggfenucevlhhushhtvghrufhiiigvpedtnecurfgrrhgrmhepmhgrihhlfhhrohhmpe gsohhquhhnodhmvghsmhhtphgruhhthhhpvghrshhonhgrlhhithihqdeiledvgeehtdei gedqudejjeekheehhedvqdgsohhquhhnrdhfvghngheppehgmhgrihhlrdgtohhmsehfih igmhgvrdhnrghmvg X-ME-Proxy: Feedback-ID: iad51458e:Fastmail Received: by mail.messagingengine.com (Postfix) with ESMTPA; Thu, 23 Mar 2023 00:40:00 -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 v2 07/10] torture: Enable clocksource watchdog with "tsc=watchdog" Date: Wed, 22 Mar 2023 21:39:32 -0700 Message-Id: <20230323043935.1221184-8-boqun.feng@gmail.com> X-Mailer: git-send-email 2.38.1 In-Reply-To: <20230323043935.1221184-1-boqun.feng@gmail.com> References: <20230323043935.1221184-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 Thu Mar 23 04:39:33 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Boqun Feng X-Patchwork-Id: 13184965 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 98A31C76196 for ; Thu, 23 Mar 2023 04:40:41 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S229526AbjCWEkl (ORCPT ); Thu, 23 Mar 2023 00:40:41 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:44208 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S230267AbjCWEkY (ORCPT ); Thu, 23 Mar 2023 00:40:24 -0400 Received: from mail-qt1-x833.google.com (mail-qt1-x833.google.com [IPv6:2607:f8b0:4864:20::833]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 9796630B29; Wed, 22 Mar 2023 21:40:06 -0700 (PDT) Received: by mail-qt1-x833.google.com with SMTP id x1so25328035qtr.7; Wed, 22 Mar 2023 21:40:06 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20210112; t=1679546405; 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=2eKmVKjQslDGUSFDeB71iLgQhY5mnH9+mfjAkHwLddk=; b=cQdr4XV2Eq7TBZvTX97/MtD3GkBTe7HSo850bFHa4RaMkHLplHqXHJcAIjfTVTiZ1g Le3232ttFxE++p1kpQK32Wzz7Zt6o5q3+OuoH9ieu8zLZwcQea074CxdkMiZq0WgP8Vr 1fj396ReY5xeEoQfWYPZG6tA6F7pSUzETAQ7vcCg3FM8pJwj6rGCxvAW4le2UlvwAlJB LS039M+P/Do0luclFqa2yvYcFVrIxQ2pPjJ1/lBE2ZDbEf2meLEUqHU7yzSuzs9DOCE4 jVsXu4D2/2iylKddPL1K9YQIu9u2oHXbAQCN0d0WIZYOmVHjawFW3/D25UZe1oO+Kc8h z35w== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; t=1679546405; 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=2eKmVKjQslDGUSFDeB71iLgQhY5mnH9+mfjAkHwLddk=; b=1RuOfcYG9EJcpg1bphdNjOPgHSF1ELV1WH7svdRGBuyfRoIA1nIRq6Y2tA7xgRGeIr njLL28uabfwqCUANsY5wmsJo3FZ+R4DOaKGIUDrmeBv6vm4YdAdkYI8LUOhE9Fc6Oq1R N3ci70lAevv2sKxacIEIZl6BJnR8bB3cBlioF4ujGTzTzXfgFeaKVcAW4zv3YKGgouQR T+ZhQt+VWjNTMX4ls0fwAqv+yHuOlmGbDYIweetoAUtVVIZD2dIdQ8UwoZSwg0jUWG6L V1/Naa0IIuth7upv+BVJisN+A4nnH0R0tMcV/Latb8rEyTMx5RQqtMpBYGlit9ZZcDFo B2Qg== X-Gm-Message-State: AO0yUKXOPGuONlI+9jbF7WmHrOoqGESGxkYYaejkUStCc2obVry88mgG GOcVWAT7Afl/fIebKCJcuRQ= X-Google-Smtp-Source: AK7set+nvPp9HapX8hErMkucpMWsU/jrsPLLDWvqTyPNIdQx1riUEseEqkVxprkJoe+qfhdzbRxv0g== X-Received: by 2002:ac8:58cb:0:b0:3e3:824f:45f1 with SMTP id u11-20020ac858cb000000b003e3824f45f1mr6962454qta.27.1679546405211; Wed, 22 Mar 2023 21:40:05 -0700 (PDT) Received: from auth1-smtp.messagingengine.com (auth1-smtp.messagingengine.com. [66.111.4.227]) by smtp.gmail.com with ESMTPSA id k3-20020ac84743000000b003e07c09cabcsm7230814qtp.4.2023.03.22.21.40.04 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 22 Mar 2023 21:40:04 -0700 (PDT) Received: from compute2.internal (compute2.nyi.internal [10.202.2.46]) by mailauth.nyi.internal (Postfix) with ESMTP id 62E1827C0054; Thu, 23 Mar 2023 00:40:04 -0400 (EDT) Received: from mailfrontend2 ([10.202.2.163]) by compute2.internal (MEProxy); Thu, 23 Mar 2023 00:40:04 -0400 X-ME-Sender: X-ME-Received: X-ME-Proxy-Cause: gggruggvucftvghtrhhoucdtuddrgedvhedrvdegfedgjeduucetufdoteggodetrfdotf fvucfrrhhofhhilhgvmecuhfgrshhtofgrihhlpdfqfgfvpdfurfetoffkrfgpnffqhgen uceurghilhhouhhtmecufedttdenucesvcftvggtihhpihgvnhhtshculddquddttddmne cujfgurhephffvvefufffkofgjfhgggfestdekredtredttdenucfhrhhomhepuehoqhhu nhcuhfgvnhhguceosghoqhhunhdrfhgvnhhgsehgmhgrihhlrdgtohhmqeenucggtffrrg htthgvrhhnpeegleejiedthedvheeggfejveefjeejkefgveffieeujefhueeigfegueeh geeggfenucevlhhushhtvghrufhiiigvpedvnecurfgrrhgrmhepmhgrihhlfhhrohhmpe gsohhquhhnodhmvghsmhhtphgruhhthhhpvghrshhonhgrlhhithihqdeiledvgeehtdei gedqudejjeekheehhedvqdgsohhquhhnrdhfvghngheppehgmhgrihhlrdgtohhmsehfih igmhgvrdhnrghmvg X-ME-Proxy: Feedback-ID: iad51458e:Fastmail Received: by mail.messagingengine.com (Postfix) with ESMTPA; Thu, 23 Mar 2023 00:40:03 -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 v2 08/10] rcutorture: Create nocb kthreads only when testing rcu in CONFIG_RCU_NOCB_CPU=y kernels Date: Wed, 22 Mar 2023 21:39:33 -0700 Message-Id: <20230323043935.1221184-9-boqun.feng@gmail.com> X-Mailer: git-send-email 2.38.1 In-Reply-To: <20230323043935.1221184-1-boqun.feng@gmail.com> References: <20230323043935.1221184-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 [ boqun: Fix checkpatch warning ] 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..e046d2c6fe10 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(); From patchwork Thu Mar 23 04:39:34 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Boqun Feng X-Patchwork-Id: 13184966 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 897E7C6FD1C for ; Thu, 23 Mar 2023 04:41:43 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S229379AbjCWElM (ORCPT ); Thu, 23 Mar 2023 00:41:12 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:43084 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229519AbjCWEkc (ORCPT ); Thu, 23 Mar 2023 00:40:32 -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 3B559305FA; Wed, 22 Mar 2023 21:40:08 -0700 (PDT) Received: by mail-qt1-x82b.google.com with SMTP id t19so11256294qta.12; Wed, 22 Mar 2023 21:40:08 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20210112; t=1679546408; 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=BMyeLr4CYvtZBRAjiGMJ5JJr/oAapqR06wdAlXxInGo=; b=m+8buwNx8vPQYZKztHNzM1Q+MsWiGu0ZM9zXx/ChzhwD/B8q4NwOsLOTrOzqaAuexm Cf9jEpqHn/PWOVGiUgJUEiTlrhRpIYZJqT2pQ7Usuan8Dp0xstoKlzPx2+aFUMg1mnnW NT4tkjxRGMGfepRgV/39HuCecR+zj6E8VN4T/q1ypTlnTaENmJ8xp+SjBtQIyeNAE5Rx VFrsuF/cJfz6e7gTf687tY/moHEVOsRQlBtevcbOjZIT99NWXch/U+F1SzUJXS04vbuf +1U6QwxPP723W0kwJD2SAJFvzvv5fZLME17ulRl167GdTolJ1ri/7IO4OXf7NxKbJBI2 W3BQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; t=1679546408; 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=BMyeLr4CYvtZBRAjiGMJ5JJr/oAapqR06wdAlXxInGo=; b=SGaJN/cZ2m2MIW2pDxUax4OM0eKWdkOU/YwD99Zml8D+UOhZszuote6iF2E6myA7ap 5cg3ho1Gp0u7ZjV4nBQTPWwJ7de+OGWeeHA1LGYMAUcTQRRzQQupNx9mB1NwQKzxwQJi U6eajQ3z0CdnOEOCsau2Z1bHGUR6K/Qmifsi11TdnPyFqI1ajpV/SDo15EKQcQZXatOF rT9+TqaPgXXlBAEncua77Oub/ODiwmE689rElSYaqIktJSbq7uLuoSZESedGruuzZCoZ OR7Uim/dAEX2CZR7SbM45ASqzJyBdthxGavMVgGI1f6MZTCL7JcIPCQx79t7PJhDZf57 vdsw== X-Gm-Message-State: AO0yUKVWEUFuhdM+1yge/dZdO78BKlRgetYpuFYo8SnAFxEYWrql3jBv tZ0yflyD5W/m7Km7jW3OiTs= X-Google-Smtp-Source: AK7set8HWxjxvGNXiX1DDamF1ASMj5Q4CMF5o8ush0fHZqJ95qH4TV+3Rl/oLP/PEcQs398tSlTbxA== X-Received: by 2002:a05:622a:1745:b0:3bf:d193:1b0 with SMTP id l5-20020a05622a174500b003bfd19301b0mr9437481qtk.48.1679546407964; Wed, 22 Mar 2023 21:40:07 -0700 (PDT) Received: from auth1-smtp.messagingengine.com (auth1-smtp.messagingengine.com. [66.111.4.227]) by smtp.gmail.com with ESMTPSA id q21-20020ac87355000000b003e387a2fbdfsm3245056qtp.0.2023.03.22.21.40.07 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 22 Mar 2023 21:40:07 -0700 (PDT) Received: from compute5.internal (compute5.nyi.internal [10.202.2.45]) by mailauth.nyi.internal (Postfix) with ESMTP id 16BC627C0054; Thu, 23 Mar 2023 00:40:07 -0400 (EDT) Received: from mailfrontend2 ([10.202.2.163]) by compute5.internal (MEProxy); Thu, 23 Mar 2023 00:40:07 -0400 X-ME-Sender: X-ME-Received: X-ME-Proxy-Cause: gggruggvucftvghtrhhoucdtuddrgedvhedrvdegfedgjedvucetufdoteggodetrfdotf fvucfrrhhofhhilhgvmecuhfgrshhtofgrihhlpdfqfgfvpdfurfetoffkrfgpnffqhgen uceurghilhhouhhtmecufedttdenucesvcftvggtihhpihgvnhhtshculddquddttddmne cujfgurhephffvvefufffkofgjfhgggfestdekredtredttdenucfhrhhomhepuehoqhhu nhcuhfgvnhhguceosghoqhhunhdrfhgvnhhgsehgmhgrihhlrdgtohhmqeenucggtffrrg htthgvrhhnpeegleejiedthedvheeggfejveefjeejkefgveffieeujefhueeigfegueeh geeggfenucevlhhushhtvghrufhiiigvpedtnecurfgrrhgrmhepmhgrihhlfhhrohhmpe gsohhquhhnodhmvghsmhhtphgruhhthhhpvghrshhonhgrlhhithihqdeiledvgeehtdei gedqudejjeekheehhedvqdgsohhquhhnrdhfvghngheppehgmhgrihhlrdgtohhmsehfih igmhgvrdhnrghmvg X-ME-Proxy: Feedback-ID: iad51458e:Fastmail Received: by mail.messagingengine.com (Postfix) with ESMTPA; Thu, 23 Mar 2023 00:40:06 -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, kernel test robot , Liam Howlett Subject: [PATCH rcu v2 09/10] rcuscale: Move shutdown from wait_event() to wait_event_idle() Date: Wed, 22 Mar 2023 21:39:34 -0700 Message-Id: <20230323043935.1221184-10-boqun.feng@gmail.com> X-Mailer: git-send-email 2.38.1 In-Reply-To: <20230323043935.1221184-1-boqun.feng@gmail.com> References: <20230323043935.1221184-1-boqun.feng@gmail.com> MIME-Version: 1.0 Precedence: bulk List-ID: X-Mailing-List: rcu@vger.kernel.org From: "Paul E. McKenney" The rcu_scale_shutdown() and kfree_scale_shutdown() kthreads/functions use wait_event() to wait for the rcuscale test to complete. However, each updater thread in such a test waits for at least 100 grace periods. If each grace period takes more than 1.2 seconds, which is long, but not insanely so, this can trigger the hung-task timeout. This commit therefore replaces those wait_event() calls with calls to wait_event_idle(), which do not trigger the hung-task timeout. Reported-by: kernel test robot Reported-by: Liam Howlett Signed-off-by: Paul E. McKenney Tested-by: Yujie Liu Signed-off-by: Boqun Feng --- kernel/rcu/rcuscale.c | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) diff --git a/kernel/rcu/rcuscale.c b/kernel/rcu/rcuscale.c index 91fb5905a008..4120f94030c3 100644 --- a/kernel/rcu/rcuscale.c +++ b/kernel/rcu/rcuscale.c @@ -631,8 +631,7 @@ static int compute_real(int n) static int rcu_scale_shutdown(void *arg) { - wait_event(shutdown_wq, - atomic_read(&n_rcu_scale_writer_finished) >= nrealwriters); + wait_event_idle(shutdown_wq, atomic_read(&n_rcu_scale_writer_finished) >= nrealwriters); smp_mb(); /* Wake before output. */ rcu_scale_cleanup(); kernel_power_off(); @@ -771,8 +770,8 @@ kfree_scale_cleanup(void) static int kfree_scale_shutdown(void *arg) { - wait_event(shutdown_wq, - atomic_read(&n_kfree_scale_thread_ended) >= kfree_nrealthreads); + wait_event_idle(shutdown_wq, + atomic_read(&n_kfree_scale_thread_ended) >= kfree_nrealthreads); smp_mb(); /* Wake before output. */ From patchwork Thu Mar 23 04:39:35 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Boqun Feng X-Patchwork-Id: 13184967 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 C970EC6FD1D for ; Thu, 23 Mar 2023 04:41:43 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S229500AbjCWElM (ORCPT ); Thu, 23 Mar 2023 00:41:12 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:44730 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229955AbjCWEkf (ORCPT ); Thu, 23 Mar 2023 00:40:35 -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 83DF62FCE8; Wed, 22 Mar 2023 21:40:12 -0700 (PDT) Received: by mail-qt1-x836.google.com with SMTP id c19so25336384qtn.13; Wed, 22 Mar 2023 21:40:12 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20210112; t=1679546410; 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=QYllBilcm/IU9PAnYZBdxmmpUrA5fngo1GjVc2mh9ak=; b=gK4Z85SY5rofkrqsycfLQWICb0UegdtSFH63NaVnIE1Fbrstw/+Qn9caJrMXuIqxf6 Msa91WRovYRo+96i0TPbXAlor/gQjZ5DHwqI30W0l6c8s08u3C7iOM/qUediU3LTSZJx K2hnF6MqWQVNrZ8CrNi+N3enb/CYO0maR/WgcBThSYLOsknVpahI3P0BOXRWxAlLDVmW hijl+c2PtBFkvYmUgG+ssFIzTavxYJLWxhkNqmKJxOMru4BAwKZ/Ms/h9jsWyxhGjMtg A/DLFm5v1fcojqHmnFeZwEcA9XS4DQyUL+2n/iSB9fBe2UhDlgfX6F3kmTep7woQORSS i8Vg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; t=1679546410; 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=QYllBilcm/IU9PAnYZBdxmmpUrA5fngo1GjVc2mh9ak=; b=oGGbgkoZqVpgjMvjY2rWhrYej/b5to/EtSotddqUVxOnDrmAEDC5eN+S7TQDeducrk +sOFQ/gTuq+pUHwUIPLjqqSWdQ8fZid4113VKv8thpmnul1Y4V0/jAU31juZu3PpjqsV 2eWxrICqIwABlf4Y1RgbpCttjUVxF/oMoFdQ3aQEZEOg/gt8ZEMLP7OKJB0/y4AZf8FL qQxRHyLdqycK5wXJcET6sFskBo0j0p21IFZCErkHqVNvPG5StvKRRaRqMvkI5EzM0hQg EIQ7xvjQOsk1zgV1Hjghwkgu/Dzvm0iBMzgrpbbJcjO/pG1gvgTzWZkux831w9Br6UlD LQMA== X-Gm-Message-State: AO0yUKXVNxlnIBCiENwVR+HMadVpl4LoNHLZBnDeNtRye1axLoYp/bNU gHm8s9QR1LgcydPEfcof+qBDqHPcE0k= X-Google-Smtp-Source: AK7set9JZoOLmWjsTk9VrJC4XjbjRB8x/Y6SDKoZUWLeFUMd52uRuHrxYLwAQmPmxhSuQKjCribigg== X-Received: by 2002:a05:622a:408:b0:3bf:d372:a5a4 with SMTP id n8-20020a05622a040800b003bfd372a5a4mr9720024qtx.50.1679546410329; Wed, 22 Mar 2023 21:40:10 -0700 (PDT) Received: from auth1-smtp.messagingengine.com (auth1-smtp.messagingengine.com. [66.111.4.227]) by smtp.gmail.com with ESMTPSA id t72-20020a37464b000000b00725d8d6983asm12559485qka.61.2023.03.22.21.40.09 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 22 Mar 2023 21:40:09 -0700 (PDT) Received: from compute5.internal (compute5.nyi.internal [10.202.2.45]) by mailauth.nyi.internal (Postfix) with ESMTP id 6753827C0054; Thu, 23 Mar 2023 00:40:09 -0400 (EDT) Received: from mailfrontend2 ([10.202.2.163]) by compute5.internal (MEProxy); Thu, 23 Mar 2023 00:40:09 -0400 X-ME-Sender: X-ME-Received: X-ME-Proxy-Cause: gggruggvucftvghtrhhoucdtuddrgedvhedrvdegfedgjedvucetufdoteggodetrfdotf fvucfrrhhofhhilhgvmecuhfgrshhtofgrihhlpdfqfgfvpdfurfetoffkrfgpnffqhgen uceurghilhhouhhtmecufedttdenucesvcftvggtihhpihgvnhhtshculddquddttddmne cujfgurhephffvvefufffkofgjfhgggfestdekredtredttdenucfhrhhomhepuehoqhhu nhcuhfgvnhhguceosghoqhhunhdrfhgvnhhgsehgmhgrihhlrdgtohhmqeenucggtffrrg htthgvrhhnpeegleejiedthedvheeggfejveefjeejkefgveffieeujefhueeigfegueeh geeggfenucevlhhushhtvghrufhiiigvpedtnecurfgrrhgrmhepmhgrihhlfhhrohhmpe gsohhquhhnodhmvghsmhhtphgruhhthhhpvghrshhonhgrlhhithihqdeiledvgeehtdei gedqudejjeekheehhedvqdgsohhquhhnrdhfvghngheppehgmhgrihhlrdgtohhmsehfih igmhgvrdhnrghmvg X-ME-Proxy: Feedback-ID: iad51458e:Fastmail Received: by mail.messagingengine.com (Postfix) with ESMTPA; Thu, 23 Mar 2023 00:40:08 -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 v2 10/10] refscale: Move shutdown from wait_event() to wait_event_idle() Date: Wed, 22 Mar 2023 21:39:35 -0700 Message-Id: <20230323043935.1221184-11-boqun.feng@gmail.com> X-Mailer: git-send-email 2.38.1 In-Reply-To: <20230323043935.1221184-1-boqun.feng@gmail.com> References: <20230323043935.1221184-1-boqun.feng@gmail.com> MIME-Version: 1.0 Precedence: bulk List-ID: X-Mailing-List: rcu@vger.kernel.org From: "Paul E. McKenney" The ref_scale_shutdown() kthread/function uses wait_event() to wait for the refscale test to complete. However, although the read-side tests are normally extremely fast, there is no law against specifying a very large value for the refscale.loops module parameter or against having a slow read-side primitive. Either way, this might well trigger the hung-task timeout. This commit therefore replaces those wait_event() calls with calls to wait_event_idle(), which do not trigger the hung-task timeout. Signed-off-by: Paul E. McKenney Signed-off-by: Boqun Feng --- kernel/rcu/refscale.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/kernel/rcu/refscale.c b/kernel/rcu/refscale.c index afa3e1a2f690..1970ce5f22d4 100644 --- a/kernel/rcu/refscale.c +++ b/kernel/rcu/refscale.c @@ -1031,7 +1031,7 @@ ref_scale_cleanup(void) static int ref_scale_shutdown(void *arg) { - wait_event(shutdown_wq, shutdown_start); + wait_event_idle(shutdown_wq, shutdown_start); smp_mb(); // Wake before output. ref_scale_cleanup();