Skip to content

Commit b1f712b

Browse files
fuyuanliakpm00
authored andcommitted
hung_task: print message when hung_task_warnings gets down to zero.
It's useful to report it when hung_task_warnings gets down to zero, so that we can know if kernel log was lost or there is no hung task was detected. Link: https://lkml.kernel.org/r/20230201135416.GA6560@didi-ThinkCentre-M920t-N000 Signed-off-by: fuyuanli <[email protected]> Reviewed-by: Petr Mladek <[email protected]> Cc: Rasmus Villemoes <[email protected]> Signed-off-by: Andrew Morton <[email protected]>
1 parent 9f79ffc commit b1f712b

File tree

1 file changed

+2
-0
lines changed

1 file changed

+2
-0
lines changed

kernel/hung_task.c

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -142,6 +142,8 @@ static void check_hung_task(struct task_struct *t, unsigned long timeout)
142142

143143
if (sysctl_hung_task_all_cpu_backtrace)
144144
hung_task_show_all_bt = true;
145+
if (!sysctl_hung_task_warnings)
146+
pr_info("Future hung task reports are suppressed, see sysctl kernel.hung_task_warnings\n");
145147
}
146148

147149
touch_nmi_watchdog();

0 commit comments

Comments
 (0)