Received: by 2002:a05:6358:11c7:b0:104:8066:f915 with SMTP id i7csp4813056rwl; Tue, 28 Mar 2023 11:37:12 -0700 (PDT) X-Google-Smtp-Source: AKy350a6SnP8d6VOz7N6vfNZmS0I7Y+nHlxXD7NF/CTvHC+gchuD0LLrzaIxpe4mOFAWeVdsShe/ X-Received: by 2002:a17:903:4303:b0:19e:b2ed:6fee with SMTP id jz3-20020a170903430300b0019eb2ed6feemr14363412plb.58.1680028631931; Tue, 28 Mar 2023 11:37:11 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1680028631; cv=none; d=google.com; s=arc-20160816; b=FzrxiA4Yh9Xzmk3W/U+Svd375YJboNqYnByv1CIfWkwpVuz1uqB8pMLKe9SqcfI1PM hkQr0uiH0HJ99rleiuSGzbc+eNrNuRL2yU8FQyTX2JA48bnlC2Jz4ekDqW/mQyjhL2De koM2NmZ2Q7kRIPFlVq7BFSTm0Hl/cygYCdzc4t+lojnop/ypRuO4pQskDjsJitWq0Q7C kQyPkvgjPm6BzzgrAow/hkFb0F1OIsnRDXewPqhFilV3DH0NPoXIAYUZJz1kGKmN8qqg YCNb3hJ5QTX/NC6YBvtcPez6luS+gLiQsOMSyy8WvcrtUrvQP+f6BOr30UuZrCbMgKC8 N2BQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:in-reply-to:content-disposition:mime-version :references:reply-to:message-id:subject:cc:to:from:date :dkim-signature; bh=+xKEwWw54whQ6d32bPCS260aeZtR0Flyl0VKHJ8ToZI=; b=WMiWXlSBRz5/bU4EL9T5H30k/EKzfmYY6etl/QLVEd5kMl9lVB3XX+tvVntrSBnD3C 7IdDgZaUaydB5RjzJ7/BJtZQsiOooCqN4fmAgyVP+51Rj9gsqZY3CB2XUkxagkb9USnc gPF4lcBgPOCai8NyUiGubPSI15GDsaNAVlsvF5oCAY7cYIT2TC8qEQh1z+kHoV3GD4oR OL2oFpWJpzZaOiDy0q6F2wiOgDKMlQEjaGioJVbPQ/ro3v0ktSzc9zB+IuGHaHTO8md/ sGU8nerD9NLotmNtsEApeTqxnjL+TC086mD0Hr2BHqx46/Ft5w9xo4NQbs322wywwgZC xbjA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b=RF5Oo+8B; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id n21-20020a170903405500b001a1cbc3bce8si22419216pla.429.2023.03.28.11.36.59; Tue, 28 Mar 2023 11:37:11 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) client-ip=2620:137:e000::1:20; Authentication-Results: mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b=RF5Oo+8B; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S229817AbjC1SQo (ORCPT + 99 others); Tue, 28 Mar 2023 14:16:44 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:55928 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229688AbjC1SQg (ORCPT ); Tue, 28 Mar 2023 14:16:36 -0400 Received: from ams.source.kernel.org (ams.source.kernel.org [IPv6:2604:1380:4601:e00::1]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 70F989F; Tue, 28 Mar 2023 11:16:35 -0700 (PDT) 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 ams.source.kernel.org (Postfix) with ESMTPS id F17E2B81E36; Tue, 28 Mar 2023 18:16:33 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id A67F7C433D2; Tue, 28 Mar 2023 18:16:32 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1680027392; bh=mX5FRbksEdfPlA5RUWG2p76bf5c21aezUdzZqBwXRc4=; h=Date:From:To:Cc:Subject:Reply-To:References:In-Reply-To:From; b=RF5Oo+8B15Rvbo4Iy/ABMMd3rpjtWQ0KLqJf4DuK8e69IgLmRwg1BH/0ck2+iyfJg Usy5YSlziFGN7jauK5Zgtqva2leRhdF85jgXTDEbqfJnuHtQ3CdjwR06duuDRjbgDG dC5TGL+vhzmFTbTfvk4T49lxKtTuNSW3ZVgKjHAxPoe3bL5Iu1jVg4rBs7ixulJHSG UGjjxaCXKkIkh0Nef1eDQxCB1JoJZ7IGEbh3JBIOzS+O/I7QCCPGa18XCvZY47dSFd jqNbz3MyHsApeDTpjRhHwWjpFEdYZr2KuJjBB5iXN4CVMj4fDtmYLlTNCgVuNopFeU HngDaNdAKISaA== Received: by paulmck-ThinkPad-P72.home (Postfix, from userid 1000) id 3A16F1540479; Tue, 28 Mar 2023 11:16:32 -0700 (PDT) Date: Tue, 28 Mar 2023 11:16:32 -0700 From: "Paul E. McKenney" To: linux-kernel@vger.kernel.org Cc: linux-tip-commits@vger.kernel.org, Jes Sorensen , "Peter Zijlstra (Intel)" , Juergen Gross , x86@kernel.org, rcu@vger.kernel.org Subject: Re: [tip: smp/core] kernel/smp: Make csdlock_debug= resettable Message-ID: Reply-To: paulmck@kernel.org References: <20230321005516.50558-4-paulmck@kernel.org> <167999248681.5837.4240401894848544789.tip-bot2@tip-bot2> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <167999248681.5837.4240401894848544789.tip-bot2@tip-bot2> X-Spam-Status: No, score=-2.5 required=5.0 tests=DKIMWL_WL_HIGH,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,RCVD_IN_DNSWL_MED,SPF_HELO_NONE, SPF_PASS autolearn=unavailable autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lindbergh.monkeyblade.net Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Tue, Mar 28, 2023 at 08:34:46AM -0000, tip-bot2 for Paul E. McKenney wrote: > The following commit has been merged into the smp/core branch of tip: > > Commit-ID: 203e435844734cfa503cd1755f35db2514db5cca > Gitweb: https://git.kernel.org/tip/203e435844734cfa503cd1755f35db2514db5cca > Author: Paul E. McKenney > AuthorDate: Mon, 20 Mar 2023 17:55:16 -07:00 > Committer: Peter Zijlstra > CommitterDate: Fri, 24 Mar 2023 11:01:26 +01:00 > > kernel/smp: Make csdlock_debug= resettable Very good, thank you! I have removed these from the -rcu tree's "dev" branch, and if testing goes well will be sending the new version to -next. Thanx, Paul > It is currently possible to set the csdlock_debug_enabled static > branch, but not to reset it. This is an issue when several different > entities supply kernel boot parameters and also for kernels built with > CONFIG_CSD_LOCK_WAIT_DEBUG_DEFAULT=y. > > Therefore, make the csdlock_debug=0 kernel boot parameter turn off > debugging. Last one wins! > > Reported-by: Jes Sorensen > Signed-off-by: Paul E. McKenney > Signed-off-by: Peter Zijlstra (Intel) > Acked-by: Juergen Gross > Link: https://lore.kernel.org/r/20230321005516.50558-4-paulmck@kernel.org > --- > Documentation/admin-guide/kernel-parameters.txt | 13 +++++++------ > kernel/smp.c | 11 ++++++++--- > 2 files changed, 15 insertions(+), 9 deletions(-) > > diff --git a/Documentation/admin-guide/kernel-parameters.txt b/Documentation/admin-guide/kernel-parameters.txt > index b15198a..5f2ec4b 100644 > --- a/Documentation/admin-guide/kernel-parameters.txt > +++ b/Documentation/admin-guide/kernel-parameters.txt > @@ -889,12 +889,13 @@ > cs89x0_media= [HW,NET] > Format: { rj45 | aui | bnc } > > - csdlock_debug= [KNL] Enable debug add-ons of cross-CPU function call > - handling. When switched on, additional debug data is > - printed to the console in case a hanging CPU is > - detected, and that CPU is pinged again in order to try > - to resolve the hang situation. The default value of > - this option depends on the CSD_LOCK_WAIT_DEBUG_DEFAULT > + csdlock_debug= [KNL] Enable or disable debug add-ons of cross-CPU > + function call handling. When switched on, > + additional debug data is printed to the console > + in case a hanging CPU is detected, and that > + CPU is pinged again in order to try to resolve > + the hang situation. The default value of this > + option depends on the CSD_LOCK_WAIT_DEBUG_DEFAULT > Kconfig option. > > dasd= [HW,NET] > diff --git a/kernel/smp.c b/kernel/smp.c > index 7a85bcd..298ba75 100644 > --- a/kernel/smp.c > +++ b/kernel/smp.c > @@ -116,11 +116,16 @@ static DEFINE_STATIC_KEY_MAYBE(CONFIG_CSD_LOCK_WAIT_DEBUG_DEFAULT, csdlock_debug > */ > static int __init csdlock_debug(char *str) > { > + int ret; > unsigned int val = 0; > > - get_option(&str, &val); > - if (val) > - static_branch_enable(&csdlock_debug_enabled); > + ret = get_option(&str, &val); > + if (ret) { > + if (val) > + static_branch_enable(&csdlock_debug_enabled); > + else > + static_branch_disable(&csdlock_debug_enabled); > + } > > return 1; > }