mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: fuyuanli <fuyuanli@didiglobal.com>
To: <pmladek@suse.com>, <akpm@linux-foundation.org>,
	<linux@rasmusvillemoes.dk>
Cc: <linux-kernel@vger.kernel.org>
Subject: [PATCH] hung_task: Print message when hung_task_warnings gets down to zero.
Date: Wed, 1 Feb 2023 21:29:51 +0800	[thread overview]
Message-ID: <20230201132951.GA382@didi-ThinkCentre-M920t-N000> (raw)

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


             reply	other threads:[~2023-02-01 13:33 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2023-02-01 13:29 fuyuanli [this message]
2023-02-01 13:54 fuyuanli
2023-02-02  9:59 ` Petr Mladek

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20230201132951.GA382@didi-ThinkCentre-M920t-N000 \
    --to=fuyuanli@didiglobal.com \
    --cc=akpm@linux-foundation.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux@rasmusvillemoes.dk \
    --cc=pmladek@suse.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox

all inboxes | Powered by JetHome®