linux/Documentation
Guilherme G. Piccoli 0ec9dc9bcb kernel/hung_task.c: introduce sysctl to print all traces when a hung task is detected
Commit 401c636a0e ("kernel/hung_task.c: show all hung tasks before
panic") introduced a change in that we started to show all CPUs
backtraces when a hung task is detected _and_ the sysctl/kernel
parameter "hung_task_panic" is set.  The idea is good, because usually
when observing deadlocks (that may lead to hung tasks), the culprit is
another task holding a lock and not necessarily the task detected as
hung.

The problem with this approach is that dumping backtraces is a slightly
expensive task, specially printing that on console (and specially in
many CPU machines, as servers commonly found nowadays).  So, users that
plan to collect a kdump to investigate the hung tasks and narrow down
the deadlock definitely don't need the CPUs backtrace on dmesg/console,
which will delay the panic and pollute the log (crash tool would easily
grab all CPUs traces with 'bt -a' command).

Also, there's the reciprocal scenario: some users may be interested in
seeing the CPUs backtraces but not have the system panic when a hung
task is detected.  The current approach hence is almost as embedding a
policy in the kernel, by forcing the CPUs backtraces' dump (only) on
hung_task_panic.

This patch decouples the panic event on hung task from the CPUs
backtraces dump, by creating (and documenting) a new sysctl called
"hung_task_all_cpu_backtrace", analog to the approach taken on soft/hard
lockups, that have both a panic and an "all_cpu_backtrace" sysctl to
allow individual control.  The new mechanism for dumping the CPUs
backtraces on hung task detection respects "hung_task_warnings" by not
dumping the traces in case there's no warnings left.

Signed-off-by: Guilherme G. Piccoli <gpiccoli@canonical.com>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Reviewed-by: Kees Cook <keescook@chromium.org>
Cc: Tetsuo Handa <penguin-kernel@I-love.SAKURA.ne.jp>
Link: http://lkml.kernel.org/r/20200327223646.20779-1-gpiccoli@canonical.com
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
2020-06-08 11:05:56 -07:00
..
ABI Char/Misc driver patches for 5.8-rc1 2020-06-07 10:59:32 -07:00
accounting
admin-guide kernel/hung_task.c: introduce sysctl to print all traces when a hung task is detected 2020-06-08 11:05:56 -07:00
arm docs: dt: convert ABI.txt to ReST format 2020-05-04 17:09:52 -05:00
arm64 A fair amount of stuff this time around, dominated by yet another massive 2020-06-01 15:45:27 -07:00
block for-5.8-tag 2020-06-02 19:59:25 -07:00
bpf docs/bpf: Add BPF ring buffer design notes 2020-06-01 14:38:22 -07:00
cdrom
core-api padata: document multithreaded jobs 2020-06-03 20:09:45 -07:00
cpu-freq
crypto
dev-tools kcov: collect coverage from interrupts 2020-06-04 19:06:20 -07:00
devicetree Char/Misc driver patches for 5.8-rc1 2020-06-07 10:59:32 -07:00
doc-guide media updates for v5.8-rc1 2020-06-03 20:59:38 -07:00
driver-api Char/Misc driver patches for 5.8-rc1 2020-06-07 10:59:32 -07:00
fault-injection
fb media updates for v5.8-rc1 2020-06-03 20:59:38 -07:00
features mm/debug: add tests validating architecture page table helpers 2020-06-04 19:06:21 -07:00
filesystems A lot of bug fixes and cleanups for ext4, including: 2020-06-05 16:19:28 -07:00
firmware_class
firmware-guide usb: typec: Add firmware documentation for the Intel PMC mux control 2020-05-13 14:20:49 +02:00
fpga Documentation: fpga: dfl: add description for performance reporting support 2020-04-28 15:49:28 +02:00
gpu Merge tag 'drm-intel-next-2020-05-15' of git://anongit.freedesktop.org/drm/drm-intel into drm-next 2020-05-20 13:36:45 +10:00
hid
hwmon Merge git://git.kernel.org/pub/scm/linux/kernel/git/netdev/net-next 2020-06-03 16:27:18 -07:00
i2c docs: i2c: rename i2c.svg to i2c_bus.svg 2020-04-20 15:45:41 -06:00
ia64 docs: add IRQ documentation at the core-api book 2020-05-15 12:00:56 -06:00
ide
iio docs: filesystems: convert configfs.txt to ReST 2020-05-05 09:23:25 -06:00
infiniband RDMA/core: Remove FMR device ops 2020-06-02 20:32:54 -03:00
input
isdn
kbuild kbuild: doc: rename LDFLAGS to KBUILD_LDFLAGS 2020-06-06 23:39:20 +09:00
kernel-hacking
leds
livepatch livepatch: Remove .klp.arch 2020-05-08 00:12:42 +02:00
locking A fair amount of stuff this time around, dominated by yet another massive 2020-06-01 15:45:27 -07:00
m68k
maintainer Documentation: fixes to the maintainer-entry-profile template 2020-06-01 09:36:07 -06:00
mhi
mips
misc-devices doc: misc-device: add uacce to toctree(index) 2020-05-05 09:41:59 -06:00
netlabel
networking Merge git://git.kernel.org/pub/scm/linux/kernel/git/netdev/net-next 2020-06-03 16:27:18 -07:00
nios2
nvdimm nvdimm: fixes to maintainter-entry-profile 2020-05-25 10:19:19 -06:00
openrisc
parisc
PCI pci-v5.8-changes 2020-06-06 11:01:58 -07:00
pcmcia
power Power management updates for 5.8-rc1 2020-06-02 13:17:23 -07:00
powerpc powerpc updates for 5.8 2020-06-05 12:39:30 -07:00
process Devicetree updates for v5.8: 2020-06-04 20:11:25 -07:00
RCU rcu: Make rcu_read_unlock_special() safe for rq/pi locks 2020-04-27 11:03:50 -07:00
riscv
s390 docs: s390: Fix wrong label Guest2 instead of Guest3 2020-05-05 09:45:28 -06:00
scheduler Documentation: scheduler: fix outdated information on sched groups 2020-04-21 13:38:27 -06:00
scsi
security Keyrings changes 2020-06-04 10:27:07 -07:00
sh
sound
sparc
sphinx docs: update recommended Sphinx version to 2.4.4 2020-04-20 15:35:58 -06:00
sphinx-static
spi
target
timers timer: add fsleep for flexible sleeping 2020-05-06 17:03:34 -07:00
trace Char/Misc driver patches for 5.8-rc1 2020-06-07 10:59:32 -07:00
translations Devicetree updates for v5.8: 2020-06-04 20:11:25 -07:00
usb A fair amount of stuff this time around, dominated by yet another massive 2020-06-01 15:45:27 -07:00
userspace-api powerpc updates for 5.8 2020-06-05 12:39:30 -07:00
virt ARM: 2020-06-03 15:13:47 -07:00
vm tools/vm/page_owner_sort.c: filter out unneeded line 2020-06-03 20:09:49 -07:00
w1 w1_therm: adding bulk read support to trigger multiple conversion on bus 2020-05-15 16:29:00 +02:00
watchdog watchdog: clarify that stop() is optional 2020-05-25 08:55:42 +02:00
x86 A fair amount of stuff this time around, dominated by yet another massive 2020-06-01 15:45:27 -07:00
xtensa
.gitignore
asm-annotations.rst
atomic_bitops.txt
atomic_t.txt
bus-virt-phys-mapping.txt
Changes
CodingStyle
conf.py docs: LaTeX/PDF: drop list of documents 2020-04-20 15:35:58 -06:00
COPYING-logo
crc32.txt
docutils.conf
dontdiff modpost: generate vmlinux.symvers and reuse it for the second modpost 2020-06-06 23:38:12 +09:00
index.rst Devicetree updates for v5.8: 2020-06-04 20:11:25 -07:00
Kconfig
kprobes.txt
logo.gif
lzo.txt
mailbox.txt
Makefile media updates for v5.8-rc1 2020-06-03 20:59:38 -07:00
memory-barriers.txt docs: fix broken references to text files 2020-04-20 15:35:59 -06:00
nommu-mmap.txt
remoteproc.txt
rpmsg.txt
speculation.txt
static-keys.txt
SubmittingPatches
tee.txt
this_cpu_ops.txt
xz.txt