diff options
author | Paul E. McKenney <paulmck@kernel.org> | 2020-09-04 11:54:52 -0700 |
---|---|---|
committer | Paul E. McKenney <paulmck@kernel.org> | 2020-09-04 11:54:52 -0700 |
commit | 6fe208f63a79f4f726f3be2b78ea3dd40487b657 (patch) | |
tree | 1b826243b70f09e101081d5ea6dd59aa37fe25a9 /lib | |
parent | 7fbe67e46aab13f99d551ab04a1168a7d58cdae9 (diff) | |
parent | 2b722160f1a7929f38dfb648c7bbb45f96e65a5b (diff) | |
download | linux-stable-6fe208f63a79f4f726f3be2b78ea3dd40487b657.tar.gz linux-stable-6fe208f63a79f4f726f3be2b78ea3dd40487b657.tar.bz2 linux-stable-6fe208f63a79f4f726f3be2b78ea3dd40487b657.zip |
Merge branch 'csd.2020.09.04a' into HEAD
csd.2020.09.04a: CPU smp_call_function() torture tests.
Diffstat (limited to 'lib')
-rw-r--r-- | lib/Kconfig.debug | 11 | ||||
-rw-r--r-- | lib/nmi_backtrace.c | 6 |
2 files changed, 16 insertions, 1 deletions
diff --git a/lib/Kconfig.debug b/lib/Kconfig.debug index 0c3a6c752ede..4ac6f61b9475 100644 --- a/lib/Kconfig.debug +++ b/lib/Kconfig.debug @@ -1377,6 +1377,17 @@ config SCF_TORTURE_TEST module may be built after the fact on the running kernel to be tested, if desired. +config CSD_LOCK_WAIT_DEBUG + bool "Debugging for csd_lock_wait(), called from smp_call_function*()" + depends on DEBUG_KERNEL + depends on 64BIT + default n + help + This option enables debug prints when CPUs are slow to respond + to the smp_call_function*() IPI wrappers. These debug prints + include the IPI handler function currently executing (if any) + and relevant stack traces. + endmenu # lock debugging config TRACE_IRQFLAGS diff --git a/lib/nmi_backtrace.c b/lib/nmi_backtrace.c index 15ca78e1c7d4..8abe1870dba4 100644 --- a/lib/nmi_backtrace.c +++ b/lib/nmi_backtrace.c @@ -85,12 +85,16 @@ void nmi_trigger_cpumask_backtrace(const cpumask_t *mask, put_cpu(); } +// Dump stacks even for idle CPUs. +static bool backtrace_idle; +module_param(backtrace_idle, bool, 0644); + bool nmi_cpu_backtrace(struct pt_regs *regs) { int cpu = smp_processor_id(); if (cpumask_test_cpu(cpu, to_cpumask(backtrace_mask))) { - if (regs && cpu_in_idle(instruction_pointer(regs))) { + if (!READ_ONCE(backtrace_idle) && regs && cpu_in_idle(instruction_pointer(regs))) { pr_warn("NMI backtrace for cpu %d skipped: idling at %pS\n", cpu, (void *)instruction_pointer(regs)); } else { |