Received: by 2002:a05:6a10:af89:0:0:0:0 with SMTP id iu9csp3387278pxb; Mon, 17 Jan 2022 19:19:38 -0800 (PST) X-Google-Smtp-Source: ABdhPJz2kDG6Ma8XBZmvmm5OE+PA3a6dPwh1hvkbPkmkdSHD6rJ84vWBg01QYKULzXQGb8XihQjf X-Received: by 2002:a63:94:: with SMTP id 142mr21453573pga.154.1642475978198; Mon, 17 Jan 2022 19:19:38 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1642475978; cv=none; d=google.com; s=arc-20160816; b=tysvtNHrvWZKQzi2UfU0jKwQqjNKp2qwpuYAUsxOKtBtETMjm9uHrlaAkrzN2Ab9fR jLLtZCtH+5hngk44kvQLH5UoHAHTCo9Q4h0RQLj8+FiiFpnubdz0DAZC/doWr5EdIuCi rdae5glco0f8m3tup2dP1KNyOrOL1rW393tCaljLL8zMoohb6stkCIMQLBeGby9Z/eeo aNj3ZhEm76ZIiOhi/3D8aIp/sxFEwHP8smz4D7/VixFfXizNeNjDhX7v8ZNfxX2q9LcV NQqxMMQPx0FMEujajNUMoS/dap0wDDW4FYYN2Z1SVzlMEc7SLCihd1bsznKWyd8HGTlO YnjQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:mime-version :references:in-reply-to:message-id:date:subject:cc:to:from :dkim-signature; bh=5Aiu1pSJxS5CXlVogGEly4n8QZ91TUusUQwFGi97wAo=; b=sVenVExZj0ndAB0kHUlgEnqsPjU6fFMYhSI9Q7fK9IPPshGa9jI8witwxKrNyRBthJ WzkxwV2gT8rGNEyyOOKi396ILgi5c8Nz4xQYA+HvqA4jejq1sI7XFpEOTH3lfRALW9TJ tSI+gFR0x9s0Dp8Y0ni43Hko4Mpo7H/khKQ+Ir5bXrf2svdS69DlqlljXn4NkfHNc7p4 qM7cEx1uTSQ4t7T+xwtiX86SHjtQKvVLu2t1gEG8pwPAxmCIx5yXiToVk2Mt+kcQKJRz dP8BSAGJAEaens9woapjJVW9PQul+dr1M5T8FuyweQqa3yGiwsWjakROtmgZe765sXs2 d1CQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b=NOQk48UN; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id p9si15068304plo.505.2022.01.17.19.19.19; Mon, 17 Jan 2022 19:19:38 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) client-ip=23.128.96.18; Authentication-Results: mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b=NOQk48UN; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S244900AbiARC3U (ORCPT + 99 others); Mon, 17 Jan 2022 21:29:20 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:57180 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1343713AbiARC0y (ORCPT ); Mon, 17 Jan 2022 21:26:54 -0500 Received: from dfw.source.kernel.org (dfw.source.kernel.org [IPv6:2604:1380:4641:c500::1]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id C0DD3C061794; Mon, 17 Jan 2022 18:25:12 -0800 (PST) Received: from smtp.kernel.org (relay.kernel.org [52.25.139.140]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by dfw.source.kernel.org (Postfix) with ESMTPS id 334506104B; Tue, 18 Jan 2022 02:25:12 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id CD0C5C36AF3; Tue, 18 Jan 2022 02:25:10 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1642472711; bh=lt6mIJfzkqvFPg0u6qu+wckvaEO9qenNedKzRuOJshc=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=NOQk48UNsMjTotl+e18vkk2mK5zNK8mreMUzs7ln0ejpzhO22wCnTTB4gfE6ZuJdF 5CAOzDt0d1NRvNmHm2rB6rewcqKigRoPsy80EBf6cdWNtGVCPpGXTjxHumWJDMnQVN iFjJNsv9uUmQC1pfOAn9X/kQMWqeQ1YwhxtyRMOQgIJY4jNPIT94gEig55nNcZdg35 1AnQ/VBI2mAdEjgVEWvvmaLJxXRK1GoPRM2/r+xMWuiGnhrrXF1BjWiohsNJacAObP Dj2VvNxKDP9UvGtnbhPrrONYdVKlyFdFcndi9EtVjccvkBCHSZuZDtwy3sDAUA55CG T+zqwFtENq+9A== From: Sasha Levin To: linux-kernel@vger.kernel.org, stable@vger.kernel.org Cc: Wander Lairson Costa , "Paul E . McKenney" , Sasha Levin , dave@stgolabs.net, josh@joshtriplett.org, rcu@vger.kernel.org Subject: [PATCH AUTOSEL 5.16 107/217] rcutorture: Avoid soft lockup during cpu stall Date: Mon, 17 Jan 2022 21:17:50 -0500 Message-Id: <20220118021940.1942199-107-sashal@kernel.org> X-Mailer: git-send-email 2.34.1 In-Reply-To: <20220118021940.1942199-1-sashal@kernel.org> References: <20220118021940.1942199-1-sashal@kernel.org> MIME-Version: 1.0 X-stable: review X-Patchwork-Hint: Ignore Content-Transfer-Encoding: 8bit Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org From: Wander Lairson Costa [ Upstream commit 5ff7c9f9d7e3e0f6db5b81945fa11b69d62f433a ] If we use the module stall_cpu option, we may get a soft lockup warning in case we also don't pass the stall_cpu_block option. Introduce the stall_no_softlockup option to avoid a soft lockup on cpu stall even if we don't use the stall_cpu_block option. Signed-off-by: Wander Lairson Costa Signed-off-by: Paul E. McKenney Signed-off-by: Sasha Levin --- kernel/rcu/rcutorture.c | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/kernel/rcu/rcutorture.c b/kernel/rcu/rcutorture.c index 8b410d982990c..05e4d6c28d1f5 100644 --- a/kernel/rcu/rcutorture.c +++ b/kernel/rcu/rcutorture.c @@ -46,6 +46,7 @@ #include #include #include +#include #include "rcu.h" @@ -109,6 +110,8 @@ torture_param(int, shutdown_secs, 0, "Shutdown time (s), <= zero to disable."); torture_param(int, stall_cpu, 0, "Stall duration (s), zero to disable."); torture_param(int, stall_cpu_holdoff, 10, "Time to wait before starting stall (s)."); +torture_param(bool, stall_no_softlockup, false, + "Avoid softlockup warning during cpu stall."); torture_param(int, stall_cpu_irqsoff, 0, "Disable interrupts while stalling."); torture_param(int, stall_cpu_block, 0, "Sleep while stalling."); torture_param(int, stall_gp_kthread, 0, @@ -2052,6 +2055,8 @@ static int rcu_torture_stall(void *args) #else schedule_timeout_uninterruptible(HZ); #endif + } else if (stall_no_softlockup) { + touch_softlockup_watchdog(); } if (stall_cpu_irqsoff) local_irq_enable(); -- 2.34.1