mirror of
git://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
synced 2026-03-22 07:27:12 +08:00
The softlockup_panic sysctl is currently a binary option: panic immediately or never panic on soft lockups. Panicking on any soft lockup, regardless of duration, can be overly aggressive for brief stalls that may be caused by legitimate operations. Conversely, never panicking may allow severe system hangs to persist undetected. Extend softlockup_panic to accept an integer threshold, allowing the kernel to panic only when the normalized lockup duration exceeds N watchdog threshold periods. This provides finer-grained control to distinguish between transient delays and persistent system failures. The accepted values are: - 0: Don't panic (unchanged) - 1: Panic when duration >= 1 * threshold (20s default, original behavior) - N > 1: Panic when duration >= N * threshold (e.g., 2 = 40s, 3 = 60s.) The original behavior is preserved for values 0 and 1, maintaining full backward compatibility while allowing systems to tolerate brief lockups while still catching severe, persistent hangs. [lirongqing@baidu.com: v2] Link: https://lkml.kernel.org/r/20251218074300.4080-1-lirongqing@baidu.com Link: https://lkml.kernel.org/r/20251216074521.2796-1-lirongqing@baidu.com Signed-off-by: Li RongQing <lirongqing@baidu.com> Cc: Eduard Zingerman <eddyz87@gmail.com> Cc: Hao Luo <haoluo@google.com> Cc: Jiri Olsa <jolsa@kernel.org> Cc: John Fastabend <john.fastabend@gmail.com> Cc: KP Singh <kpsingh@kernel.org> Cc: Lance Yang <lance.yang@linux.dev> Cc: Martin KaFai Lau <martin.lau@linux.dev> Cc: Nicholas Piggin <npiggin@gmail.com> Cc: Song Liu <song@kernel.org> Cc: Stanislav Fomichev <sdf@fomichev.me> Cc: Yonghong Song <yonghong.song@linux.dev> Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
120 lines
2.7 KiB
Plaintext
120 lines
2.7 KiB
Plaintext
# Help: Debugging for CI systems and finding regressions
|
|
#
|
|
# The config is based on running daily CI for enterprise Linux distros to
|
|
# seek regressions on linux-next builds on different bare-metal and virtual
|
|
# platforms. It can be used for example,
|
|
#
|
|
# $ make ARCH=arm64 defconfig debug.config
|
|
#
|
|
# Keep alphabetically sorted inside each section.
|
|
#
|
|
# printk and dmesg options
|
|
#
|
|
CONFIG_DEBUG_BUGVERBOSE=y
|
|
CONFIG_DYNAMIC_DEBUG=y
|
|
CONFIG_PRINTK_CALLER=y
|
|
CONFIG_PRINTK_TIME=y
|
|
CONFIG_SYMBOLIC_ERRNAME=y
|
|
#
|
|
# Compile-time checks and compiler options
|
|
#
|
|
CONFIG_DEBUG_INFO=y
|
|
CONFIG_DEBUG_INFO_DWARF_TOOLCHAIN_DEFAULT=y
|
|
CONFIG_DEBUG_SECTION_MISMATCH=y
|
|
CONFIG_FRAME_WARN=2048
|
|
CONFIG_SECTION_MISMATCH_WARN_ONLY=y
|
|
#
|
|
# Generic Kernel Debugging Instruments
|
|
#
|
|
# CONFIG_UBSAN_ALIGNMENT is not set
|
|
# CONFIG_UBSAN_DIV_ZERO is not set
|
|
# CONFIG_UBSAN_TRAP is not set
|
|
# CONFIG_WARN_ALL_UNSEEDED_RANDOM is not set
|
|
CONFIG_DEBUG_FS=y
|
|
CONFIG_DEBUG_FS_ALLOW_ALL=y
|
|
CONFIG_DEBUG_IRQFLAGS=y
|
|
CONFIG_UBSAN=y
|
|
CONFIG_UBSAN_BOOL=y
|
|
CONFIG_UBSAN_BOUNDS=y
|
|
CONFIG_UBSAN_ENUM=y
|
|
CONFIG_UBSAN_SHIFT=y
|
|
CONFIG_UBSAN_UNREACHABLE=y
|
|
#
|
|
# Networking Debugging
|
|
#
|
|
CONFIG_NET_DEV_REFCNT_TRACKER=y
|
|
CONFIG_NET_NS_REFCNT_TRACKER=y
|
|
CONFIG_DEBUG_NET=y
|
|
#
|
|
# Memory Debugging
|
|
#
|
|
# CONFIG_DEBUG_PAGEALLOC is not set
|
|
# CONFIG_DEBUG_KMEMLEAK_DEFAULT_OFF is not set
|
|
# CONFIG_DEBUG_RODATA_TEST is not set
|
|
# CONFIG_DEBUG_WX is not set
|
|
# CONFIG_KFENCE is not set
|
|
# CONFIG_PAGE_POISONING is not set
|
|
# CONFIG_SLUB_STATS is not set
|
|
CONFIG_PAGE_EXTENSION=y
|
|
CONFIG_PAGE_OWNER=y
|
|
CONFIG_DEBUG_KMEMLEAK=y
|
|
CONFIG_DEBUG_KMEMLEAK_AUTO_SCAN=y
|
|
CONFIG_DEBUG_OBJECTS=y
|
|
CONFIG_DEBUG_OBJECTS_ENABLE_DEFAULT=1
|
|
CONFIG_DEBUG_OBJECTS_FREE=y
|
|
CONFIG_DEBUG_OBJECTS_PERCPU_COUNTER=y
|
|
CONFIG_DEBUG_OBJECTS_RCU_HEAD=y
|
|
CONFIG_DEBUG_OBJECTS_TIMERS=y
|
|
CONFIG_DEBUG_OBJECTS_WORK=y
|
|
CONFIG_DEBUG_PER_CPU_MAPS=y
|
|
CONFIG_DEBUG_STACK_USAGE=y
|
|
CONFIG_DEBUG_VIRTUAL=y
|
|
CONFIG_DEBUG_VM=y
|
|
CONFIG_DEBUG_VM_PGFLAGS=y
|
|
CONFIG_DEBUG_VM_RB=y
|
|
CONFIG_DEBUG_VM_VMACACHE=y
|
|
CONFIG_KASAN=y
|
|
CONFIG_KASAN_GENERIC=y
|
|
CONFIG_KASAN_INLINE=y
|
|
CONFIG_KASAN_VMALLOC=y
|
|
CONFIG_PTDUMP_DEBUGFS=y
|
|
CONFIG_SCHED_STACK_END_CHECK=y
|
|
CONFIG_SLUB_DEBUG_ON=y
|
|
#
|
|
# Debug Oops, Lockups and Hangs
|
|
#
|
|
CONFIG_BOOTPARAM_HUNG_TASK_PANIC=0
|
|
CONFIG_BOOTPARAM_SOFTLOCKUP_PANIC=0
|
|
CONFIG_DEBUG_ATOMIC_SLEEP=y
|
|
CONFIG_DETECT_HUNG_TASK=y
|
|
CONFIG_PANIC_ON_OOPS=y
|
|
CONFIG_PANIC_TIMEOUT=0
|
|
CONFIG_SOFTLOCKUP_DETECTOR=y
|
|
#
|
|
# Lock Debugging (spinlocks, mutexes, etc...)
|
|
#
|
|
# CONFIG_PROVE_RAW_LOCK_NESTING is not set
|
|
CONFIG_PROVE_LOCKING=y
|
|
#
|
|
# Debug kernel data structures
|
|
#
|
|
CONFIG_BUG_ON_DATA_CORRUPTION=y
|
|
#
|
|
# RCU Debugging
|
|
#
|
|
CONFIG_RCU_EXPERT=y
|
|
CONFIG_PROVE_RCU=y
|
|
CONFIG_PROVE_RCU_LIST=y
|
|
#
|
|
# Tracers
|
|
#
|
|
CONFIG_BRANCH_PROFILE_NONE=y
|
|
CONFIG_DYNAMIC_FTRACE=y
|
|
CONFIG_FTRACE=y
|
|
CONFIG_FUNCTION_TRACER=y
|
|
#
|
|
# Preemption
|
|
#
|
|
CONFIG_DEBUG_PREEMPT=y
|
|
CONFIG_PREEMPT=y
|