summaryrefslogtreecommitdiff
path: root/kernel/hung_task.c
diff options
context:
space:
mode:
authorfuyuanli <fuyuanli@didiglobal.com>2023-02-01 21:54:33 +0800
committerAndrew Morton <akpm@linux-foundation.org>2023-02-09 17:03:20 -0800
commitb1f712b308dcdb1af73e5fcf3d8bf8eb44b36600 (patch)
tree2e82aa14411e357872d99e4492b6e99705e90714 /kernel/hung_task.c
parent9f79ffc19302253d0b9fe1f5e0cdf1cb04eae78c (diff)
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 <fuyuanli@didiglobal.com> Reviewed-by: Petr Mladek <pmladek@suse.com> Cc: Rasmus Villemoes <linux@rasmusvillemoes.dk> Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Diffstat (limited to 'kernel/hung_task.c')
-rw-r--r--kernel/hung_task.c2
1 files changed, 2 insertions, 0 deletions
diff --git a/kernel/hung_task.c b/kernel/hung_task.c
index c71889f3f3fc..322813366c6c 100644
--- a/kernel/hung_task.c
+++ b/kernel/hung_task.c
@@ -142,6 +142,8 @@ static void check_hung_task(struct task_struct *t, unsigned long timeout)
if (sysctl_hung_task_all_cpu_backtrace)
hung_task_show_all_bt = true;
+ if (!sysctl_hung_task_warnings)
+ pr_info("Future hung task reports are suppressed, see sysctl kernel.hung_task_warnings\n");
}
touch_nmi_watchdog();