From: Andrew Morton <akpm@linux-foundation.org>
To: Liu Song <liusong@linux.alibaba.com>
Cc: dianders@chromium.org, pmladek@suse.com, linux-kernel@vger.kernel.org
Subject: Re: [PATCH] watchdog/hardlockup: set watchdog_hardlockup_warned to true as early as possible
Date: Sat, 5 Aug 2023 10:17:05 -0700 [thread overview]
Message-ID: <20230805101705.3a38ce9aacc924f1c9f0842b@linux-foundation.org> (raw)
In-Reply-To: <20230805160144.121875-1-liusong@linux.alibaba.com>
On Sun, 6 Aug 2023 00:01:44 +0800 Liu Song <liusong@linux.alibaba.com> wrote:
> Since we want to ensure only printing hardlockups once, it is necessary
> to set "watchdog_hardlockup_warned" to true as early as possible.
>
> ...
>
> --- a/kernel/watchdog.c
> +++ b/kernel/watchdog.c
> @@ -180,6 +180,8 @@ void watchdog_hardlockup_check(unsigned int cpu, struct pt_regs *regs)
> /* Only print hardlockups once. */
> if (per_cpu(watchdog_hardlockup_warned, cpu))
> return;
> + else
> + per_cpu(watchdog_hardlockup_warned, cpu) = true;
The "else" is unneeded.
> pr_emerg("Watchdog detected hard LOCKUP on cpu %d\n", cpu);
> print_modules();
> @@ -206,8 +208,6 @@ void watchdog_hardlockup_check(unsigned int cpu, struct pt_regs *regs)
>
> if (hardlockup_panic)
> nmi_panic(regs, "Hard LOCKUP");
> -
> - per_cpu(watchdog_hardlockup_warned, cpu) = true;
> } else {
> per_cpu(watchdog_hardlockup_warned, cpu) = false;
> }
When resending, please tell us some more about the effects of the
change. Presumably there are circumstances in which excess output is
produced? If so, describe these circumstances and the observed
effects.
next prev parent reply other threads:[~2023-08-05 17:17 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2023-08-05 16:01 Liu Song
2023-08-05 17:17 ` Andrew Morton [this message]
2023-08-06 2:52 ` Liu Song
2023-08-07 13:54 ` 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=20230805101705.3a38ce9aacc924f1c9f0842b@linux-foundation.org \
--to=akpm@linux-foundation.org \
--cc=dianders@chromium.org \
--cc=linux-kernel@vger.kernel.org \
--cc=liusong@linux.alibaba.com \
--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®