mirror of
git://git.kernel.org/pub/scm/linux/kernel/git/xiang/erofs.git
synced 2026-10-31 06:14:39 +01:00
The hung_task_panic sysctl is currently a blunt instrument: it's all or nothing. Panicking on a single hung task can be an overreaction to a transient glitch. A more reliable indicator of a systemic problem is when multiple tasks hang simultaneously. Extend hung_task_panic to accept an integer threshold, allowing the kernel to panic only when N hung tasks are detected in a single scan. This provides finer control to distinguish between isolated incidents and system-wide failures. The accepted values are: - 0: Don't panic (unchanged) - 1: Panic on the first hung task (unchanged) - N > 1: Panic after N hung tasks are detected in a single scan The original behavior is preserved for values 0 and 1, maintaining full backward compatibility. [[email protected]: new changelog] Link: https://lkml.kernel.org/r/[email protected] Signed-off-by: Li RongQing <[email protected]> Reviewed-by: Masami Hiramatsu (Google) <[email protected]> Reviewed-by: Lance Yang <[email protected]> Tested-by: Lance Yang <[email protected]> Acked-by: Andrew Jeffery <[email protected]> [aspeed_g5_defconfig] Cc: Anshuman Khandual <[email protected]> Cc: Arnd Bergmann <[email protected]> Cc: David Hildenbrand <[email protected]> Cc: Florian Wesphal <[email protected]> Cc: Jakub Kacinski <[email protected]> Cc: Jason A. Donenfeld <[email protected]> Cc: Joel Granados <[email protected]> Cc: Joel Stanley <[email protected]> Cc: Jonathan Corbet <[email protected]> Cc: Kees Cook <[email protected]> Cc: Liam Howlett <[email protected]> Cc: Lorenzo Stoakes <[email protected]> Cc: "Paul E . McKenney" <[email protected]> Cc: Pawan Gupta <[email protected]> Cc: Petr Mladek <[email protected]> Cc: Phil Auld <[email protected]> Cc: Randy Dunlap <[email protected]> Cc: Russell King <[email protected]> Cc: Shuah Khan <[email protected]> Cc: Simon Horman <[email protected]> Cc: Stanislav Fomichev <[email protected]> Cc: Steven Rostedt <[email protected]> Signed-off-by: Andrew Morton <[email protected]>