panic: add option to dump blocked tasks in panic_print
authorFeng Tang <feng.tang@intel.com>
Fri, 2 Feb 2024 13:20:42 +0000 (21:20 +0800)
committerAndrew Morton <akpm@linux-foundation.org>
Thu, 22 Feb 2024 23:38:55 +0000 (15:38 -0800)
commit2e3fc6ca521499a985a1829a21759ac25359c0f3
tree52552999d8a198094d755328291be4cd13464c0e
parentac4db926e17a669c788efc89b81a4a0f40648445
panic: add option to dump blocked tasks in panic_print

For debugging kernel panics and other bugs, there is already an option of
panic_print to dump all tasks' call stacks.  On today's large servers
running many containers, there could be thousands of tasks or more, and
this will print out huge amount of call stacks, taking a lot of time (for
serial console which is main target user case of panic_print).

And in many cases, only those several tasks being blocked are key for the
panic, so add an option to only dump blocked tasks' call stacks.

[akpm@linux-foundation.org: clarify documentation a little]
Link: https://lkml.kernel.org/r/20240202132042.3609657-1-feng.tang@intel.com
Signed-off-by: Feng Tang <feng.tang@intel.com>
Tested-by: Guilherme G. Piccoli <gpiccoli@igalia.com>
Cc: Jonathan Corbet <corbet@lwn.net>
Cc: Josh Poimboeuf <jpoimboe@kernel.org>
Cc: Peter Zijlstra (Intel) <peterz@infradead.org>
Cc: Randy Dunlap <rdunlap@infradead.org>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Documentation/admin-guide/kernel-parameters.txt
Documentation/admin-guide/sysctl/kernel.rst
kernel/panic.c