From: Qingjie Xing <xqjcool@gmail.com>
To: mingo@redhat.com
Cc: peterz@infradead.org, juri.lelli@redhat.com,
vincent.guittot@linaro.org, dietmar.eggemann@arm.com,
rostedt@goodmis.org, bsegall@google.com, mgorman@suse.de,
bristot@redhat.com, vschneid@redhat.com, brauner@kernel.org,
linux-kernel@vger.kernel.org, xqjcool@gmail.com
Subject: [PATCH] sched/debug,sched/core: Reset hung task detector while processing sysrq-t
Date: Wed, 7 Jun 2023 11:12:21 -0700 [thread overview]
Message-ID: <20230607181221.4118381-1-xqjcool@gmail.com> (raw)
On devices with multiple CPUs and multiple processes, outputting lengthy
sysrq-t content on a slow serial port can consume a significant amount
of time. We need to reset the hung task detector to avoid false hung task
alerts.
Signed-off-by: Qingjie Xing <xqjcool@gmail.com>
---
kernel/sched/core.c | 1 +
kernel/sched/debug.c | 1 +
2 files changed, 2 insertions(+)
diff --git a/kernel/sched/core.c b/kernel/sched/core.c
index a68d1276bab0..5773283b752c 100644
--- a/kernel/sched/core.c
+++ b/kernel/sched/core.c
@@ -9176,6 +9176,7 @@ void show_state_filter(unsigned int state_filter)
*/
touch_nmi_watchdog();
touch_all_softlockup_watchdogs();
+ reset_hung_task_detector();
if (state_filter_match(state_filter, p))
sched_show_task(p);
}
diff --git a/kernel/sched/debug.c b/kernel/sched/debug.c
index 0b2340a79b65..43065808b425 100644
--- a/kernel/sched/debug.c
+++ b/kernel/sched/debug.c
@@ -904,6 +904,7 @@ void sysrq_sched_debug_show(void)
*/
touch_nmi_watchdog();
touch_all_softlockup_watchdogs();
+ reset_hung_task_detector();
print_cpu(NULL, cpu);
}
}
--
2.40.1
next reply other threads:[~2023-06-07 18:13 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2023-06-07 18:12 Qingjie Xing [this message]
-- strict thread matches above, loose matches on Subject: below --
2023-06-07 18:21 [PATCH] sched/debug,sched/core: Reset hung task detector while processing sysrq-t Qingjie Xing
2023-06-07 18:09 Qingjie Xing
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=20230607181221.4118381-1-xqjcool@gmail.com \
--to=xqjcool@gmail.com \
--cc=brauner@kernel.org \
--cc=bristot@redhat.com \
--cc=bsegall@google.com \
--cc=dietmar.eggemann@arm.com \
--cc=juri.lelli@redhat.com \
--cc=linux-kernel@vger.kernel.org \
--cc=mgorman@suse.de \
--cc=mingo@redhat.com \
--cc=peterz@infradead.org \
--cc=rostedt@goodmis.org \
--cc=vincent.guittot@linaro.org \
--cc=vschneid@redhat.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;
as well as URLs for NNTP newsgroup(s).