The Linux Kernel Mailing List
 help / color / mirror / Atom feed
From: Petr Mladek <pmladek@suse.com>
To: Liu Song <liusong@linux.alibaba.com>
Cc: Andrew Morton <akpm@linux-foundation.org>,
	dianders@chromium.org, linux-kernel@vger.kernel.org
Subject: Re: [PATCH] watchdog/hardlockup: set watchdog_hardlockup_warned to true as early as possible
Date: Mon, 7 Aug 2023 15:54:04 +0200	[thread overview]
Message-ID: <ZND3fGv3e5C_JP9h@alley> (raw)
In-Reply-To: <bc4da863-dacb-66a7-133d-0e6e91e4477a@linux.alibaba.com>

On Sun 2023-08-06 10:52:57, Liu Song wrote:
> 
> 在 2023/8/6 01:17, Andrew Morton 写道:
> > 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.
> 
> Hi,
> 
> I haven't found duplicate warnings in the real environment.
> 
> However, considering that when system occurs hard lockup is basically
> abnormal, it
> 
> seems more reasonable to set "watchdog_hardlockup_warned" to ture, rather
> than
> 
> waiting for all kinds of information to be printed.

I believe that this is not needed.

watchdog_hardlockup_check(cpu, regs) is called on a CPU periodically.
There are two callers:

   + buddy detector checks the particular CPU when the solflockup's
     hrtimer callback is called. See watchdog_hardlockup_kick()
     in watchdog_timer_fn().

   + perf detector checks the particular CPU from a perf callback,
     see watchdog_overflow_callback().

Neither timer nor perf callbacks might be nested. They are naturally
serialized on a given CPU. So, races are not possible in this case.

Best Regards,
Petr

      reply	other threads:[~2023-08-07 13:57 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2023-08-05 16:01 [PATCH] watchdog/hardlockup: set watchdog_hardlockup_warned to true as early as possible Liu Song
2023-08-05 17:17 ` Andrew Morton
2023-08-06  2:52   ` Liu Song
2023-08-07 13:54     ` Petr Mladek [this message]

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=ZND3fGv3e5C_JP9h@alley \
    --to=pmladek@suse.com \
    --cc=akpm@linux-foundation.org \
    --cc=dianders@chromium.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=liusong@linux.alibaba.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