The patch titled Subject: hung_task: ignore hung_task_warnings when hung_task_panic is enabled has been added to the -mm mm-nonmm-unstable branch. Its filename is hung_task-ignore-hung_task_warnings-when-hung_task_panic-is-enabled.patch This patch will shortly appear at https://git.kernel.org/pub/scm/linux/kernel/git/akpm/25-new.git/tree/patches/hung_task-ignore-hung_task_warnings-when-hung_task_panic-is-enabled.patch This patch will later appear in the mm-nonmm-unstable branch at git://git.kernel.org/pub/scm/linux/kernel/git/akpm/mm Before you just go and hit "reply", please: a) Consider who else should be cc'ed b) Prefer to cc a suitable mailing list as well c) Ideally: find the original patch on the mailing list and do a reply-to-all to that, adding suitable additional cc's *** Remember to use Documentation/process/submit-checklist.rst when testing your code *** The -mm tree is included into linux-next via the mm-everything branch at git://git.kernel.org/pub/scm/linux/kernel/git/akpm/mm and is updated there every 2-3 working days ------------------------------------------------------ From: Yongliang Gao <leonylgao@xxxxxxxxxxx> Subject: hung_task: ignore hung_task_warnings when hung_task_panic is enabled Date: Thu, 13 Jun 2024 11:31:59 +0800 If hung_task_panic is enabled, don't consider the value of hung_task_warnings and display the information of the hung tasks. In some cases, hung_task_panic might not be initially set up, after several hung tasks occur, the hung_task_warnings count reaches zero. If hung_task_panic is set up later, it may not display any helpful hung task info in dmesg, only showing messages like: Kernel panic - not syncing: hung_task: blocked tasks CPU: 3 PID: 58 Comm: khungtaskd Not tainted 6.10.0-rc3 #19 Hardware name: QEMU Standard PC (i440FX + PIIX, 1996) Call Trace: <TASK> panic+0x2f3/0x320 watchdog+0x2dd/0x510 ? __pfx_watchdog+0x10/0x10 kthread+0xe0/0x110 ? __pfx_kthread+0x10/0x10 ret_from_fork+0x2f/0x40 ? __pfx_kthread+0x10/0x10 ret_from_fork_asm+0x1a/0x30 </TASK> Link: https://lkml.kernel.org/r/20240613033159.3446265-1-leonylgao@xxxxxxxxx Signed-off-by: Yongliang Gao <leonylgao@xxxxxxxxxxx> Reviewed-by: Huang Cun <cunhuang@xxxxxxxxxxx> Cc: Joel Granados <j.granados@xxxxxxxxxxx> Cc: John Siddle <jsiddle@xxxxxxxxxx> Cc: Kent Overstreet <kent.overstreet@xxxxxxxxx> Signed-off-by: Andrew Morton <akpm@xxxxxxxxxxxxxxxxxxxx> --- kernel/hung_task.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) --- a/kernel/hung_task.c~hung_task-ignore-hung_task_warnings-when-hung_task_panic-is-enabled +++ a/kernel/hung_task.c @@ -127,7 +127,7 @@ static void check_hung_task(struct task_ * Ok, the task did not get scheduled for more than 2 minutes, * complain: */ - if (sysctl_hung_task_warnings) { + if (sysctl_hung_task_warnings || hung_task_call_panic) { if (sysctl_hung_task_warnings > 0) sysctl_hung_task_warnings--; pr_err("INFO: task %s:%d blocked for more than %ld seconds.\n", _ Patches currently in -mm which might be from leonylgao@xxxxxxxxxxx are hung_task-ignore-hung_task_warnings-when-hung_task_panic-is-enabled.patch