linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH] hung_task: Print message when hung_task_warnings gets down to zero.
@ 2023-02-01 13:29 fuyuanli
  0 siblings, 0 replies; 3+ messages in thread
From: fuyuanli @ 2023-02-01 13:29 UTC (permalink / raw)
  To: pmladek, akpm, linux; +Cc: linux-kernel

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.

Signed-off-by: fuyuanli <fuyuanli@didiglobal.com>
---
 kernel/hung_task.c | 2 ++
 1 file changed, 2 insertions(+)

diff --git a/kernel/hung_task.c b/kernel/hung_task.c
index bb2354f73ded..ff479c51143d 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();
-- 
2.17.1


^ permalink raw reply related	[flat|nested] 3+ messages in thread

* Re: [PATCH] hung_task: Print message when hung_task_warnings gets down to zero.
  2023-02-01 13:54 fuyuanli
@ 2023-02-02  9:59 ` Petr Mladek
  0 siblings, 0 replies; 3+ messages in thread
From: Petr Mladek @ 2023-02-02  9:59 UTC (permalink / raw)
  To: akpm, linux, linux-kernel

On Wed 2023-02-01 21:54:33, fuyuanli wrote:
> 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.
> 
> Signed-off-by: fuyuanli <fuyuanli@didiglobal.com>

Looks good to me.

Reviewed-by: Petr Mladek <pmladek@suse.com>

Best Regards,
Petr

^ permalink raw reply	[flat|nested] 3+ messages in thread

* [PATCH] hung_task: Print message when hung_task_warnings gets down to zero.
@ 2023-02-01 13:54 fuyuanli
  2023-02-02  9:59 ` Petr Mladek
  0 siblings, 1 reply; 3+ messages in thread
From: fuyuanli @ 2023-02-01 13:54 UTC (permalink / raw)
  To: pmladek, akpm, linux; +Cc: linux-kernel

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.

Signed-off-by: fuyuanli <fuyuanli@didiglobal.com>
---
 kernel/hung_task.c | 2 ++
 1 file changed, 2 insertions(+)

diff --git a/kernel/hung_task.c b/kernel/hung_task.c
index bb2354f73ded..ff479c51143d 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();
-- 
2.17.1


^ permalink raw reply related	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2023-02-02 10:00 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2023-02-01 13:29 [PATCH] hung_task: Print message when hung_task_warnings gets down to zero fuyuanli
2023-02-01 13:54 fuyuanli
2023-02-02  9:59 ` Petr Mladek

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).