mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: "tip-bot2 for Paul E. McKenney" <tip-bot2@linutronix.de>
To: linux-tip-commits@vger.kernel.org
Cc: "Paul E. McKenney" <paulmck@kernel.org>,
	"Peter Zijlstra (Intel)" <peterz@infradead.org>,
	Juergen Gross <jgross@suse.com>,
	x86@kernel.org, linux-kernel@vger.kernel.org
Subject: [tip: smp/core] locking/csd_lock: Add Kconfig option for csd_debug default
Date: Tue, 28 Mar 2023 08:34:47 -0000	[thread overview]
Message-ID: <167999248761.5837.5758345327502379976.tip-bot2@tip-bot2> (raw)
In-Reply-To: <20230321005516.50558-1-paulmck@kernel.org>

The following commit has been merged into the smp/core branch of tip:

Commit-ID:     c52198601695851622f361d3f16456e9fc857629
Gitweb:        https://git.kernel.org/tip/c52198601695851622f361d3f16456e9fc857629
Author:        Paul E. McKenney <paulmck@kernel.org>
AuthorDate:    Mon, 20 Mar 2023 17:55:13 -07:00
Committer:     Peter Zijlstra <peterz@infradead.org>
CommitterDate: Fri, 24 Mar 2023 11:01:25 +01:00

locking/csd_lock: Add Kconfig option for csd_debug default

The csd_debug kernel parameter works well, but is inconvenient in cases
where it is more closely associated with boot loaders or automation than
with a particular kernel version or release.  Thererfore, provide a new
CSD_LOCK_WAIT_DEBUG_DEFAULT Kconfig option that defaults csd_debug to
1 when selected and 0 otherwise, with this latter being the default.

Signed-off-by: Paul E. McKenney <paulmck@kernel.org>
Signed-off-by: Peter Zijlstra (Intel) <peterz@infradead.org>
Acked-by: Juergen Gross <jgross@suse.com>
Link: https://lore.kernel.org/r/20230321005516.50558-1-paulmck@kernel.org
---
 Documentation/admin-guide/kernel-parameters.txt |  6 ++++--
 kernel/smp.c                                    |  2 +-
 lib/Kconfig.debug                               |  9 +++++++++
 3 files changed, 14 insertions(+), 3 deletions(-)

diff --git a/Documentation/admin-guide/kernel-parameters.txt b/Documentation/admin-guide/kernel-parameters.txt
index 6221a1d..ce70777 100644
--- a/Documentation/admin-guide/kernel-parameters.txt
+++ b/Documentation/admin-guide/kernel-parameters.txt
@@ -893,8 +893,10 @@
 			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.
-			0: disable csdlock debugging (default)
+			to resolve the hang situation.  The default value of
+			this option depends on the CSD_LOCK_WAIT_DEBUG_DEFAULT
+			Kconfig option.
+			0: disable csdlock debugging
 			1: enable basic csdlock debugging (minor impact)
 			ext: enable extended csdlock debugging (more impact,
 			     but more data)
diff --git a/kernel/smp.c b/kernel/smp.c
index 06a4139..e2d558f 100644
--- a/kernel/smp.c
+++ b/kernel/smp.c
@@ -158,7 +158,7 @@ void __init call_function_init(void)
 
 #ifdef CONFIG_CSD_LOCK_WAIT_DEBUG
 
-static DEFINE_STATIC_KEY_FALSE(csdlock_debug_enabled);
+static DEFINE_STATIC_KEY_MAYBE(CONFIG_CSD_LOCK_WAIT_DEBUG_DEFAULT, csdlock_debug_enabled);
 static DEFINE_STATIC_KEY_FALSE(csdlock_debug_extended);
 
 static int __init csdlock_debug(char *str)
diff --git a/lib/Kconfig.debug b/lib/Kconfig.debug
index c8b379e..e1b160a 100644
--- a/lib/Kconfig.debug
+++ b/lib/Kconfig.debug
@@ -1480,6 +1480,15 @@ config CSD_LOCK_WAIT_DEBUG
 	  include the IPI handler function currently executing (if any)
 	  and relevant stack traces.
 
+config CSD_LOCK_WAIT_DEBUG_DEFAULT
+	bool "Default csd_lock_wait() debugging on at boot time"
+	depends on CSD_LOCK_WAIT_DEBUG
+	depends on 64BIT
+	default n
+	help
+	  This option causes the csdlock_debug= kernel boot parameter to
+	  default to 1 (basic debugging) instead of 0 (no debugging).
+
 endmenu # lock debugging
 
 config TRACE_IRQFLAGS

  reply	other threads:[~2023-03-28  8:35 UTC|newest]

Thread overview: 15+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2023-03-21  0:54 [PATCH RFC smp] Remove diagnostics and adjust config for CSD lock diagnostics Paul E. McKenney
2023-03-21  0:55 ` [PATCH CSDlock 1/4] locking/csd_lock: Add Kconfig option for csd_debug default Paul E. McKenney
2023-03-28  8:34   ` tip-bot2 for Paul E. McKenney [this message]
2023-03-21  0:55 ` [PATCH CSDlock 2/4] locking/csd_lock: Remove added data from CSD lock debugging Paul E. McKenney
2023-03-28  8:34   ` [tip: smp/core] " tip-bot2 for Paul E. McKenney
2023-03-21  0:55 ` [PATCH CSDlock 3/4] locking/csd_lock: Remove per-CPU data indirection " Paul E. McKenney
2023-03-28  8:34   ` [tip: smp/core] " tip-bot2 for Paul E. McKenney
2023-03-21  0:55 ` [PATCH CSDlock 4/4] kernel/smp: Make csdlock_debug= resettable Paul E. McKenney
2023-03-28  8:34   ` [tip: smp/core] " tip-bot2 for Paul E. McKenney
2023-03-28 18:16     ` Paul E. McKenney
2023-03-21  5:46 ` [PATCH RFC smp] Remove diagnostics and adjust config for CSD lock diagnostics Juergen Gross
2023-03-21 10:22 ` Peter Zijlstra
2023-03-21 15:38   ` Paul E. McKenney
2023-03-22  9:57     ` Peter Zijlstra
2023-03-22 14:46       ` Paul E. McKenney

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=167999248761.5837.5758345327502379976.tip-bot2@tip-bot2 \
    --to=tip-bot2@linutronix.de \
    --cc=jgross@suse.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-tip-commits@vger.kernel.org \
    --cc=paulmck@kernel.org \
    --cc=peterz@infradead.org \
    --cc=x86@kernel.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox

all inboxes | Powered by JetHome®