From: Petr Mladek <pmladek@suse.com>
To: John Ogness <john.ogness@linutronix.de>
Cc: Douglas Anderson <dianders@chromium.org>,
Andrew Morton <akpm@linux-foundation.org>,
Li Zhe <lizhe.67@bytedance.com>,
Pingfan Liu <kernelfans@gmail.com>,
Lecopzer Chen <lecopzer.chen@mediatek.com>,
linux-kernel@vger.kernel.org
Subject: Re: [PATCH 0/4] watchdog: Better handling of concurrent lockups
Date: Wed, 7 Feb 2024 14:04:20 +0100 [thread overview]
Message-ID: <ZcN_1DOwE4D6jrra@alley> (raw)
In-Reply-To: <87ttmlan1d.fsf@jogness.linutronix.de>
On Tue 2024-02-06 11:51:50, John Ogness wrote:
> On 2024-02-06, Petr Mladek <pmladek@suse.com> wrote:
> > I have just got an idea how to make printk_cpu_sync_get_irqsave()
> > less error prone for deadlock on the panic() CPU. The idea is
> > to ignore the lock or give up locking after a timeout on
> > the panic CPU.
>
> This idea is out of scope for this series. But it is something we should
> think about. The issue has always been a possible problem in panic().
>
> > AFAIK, the lock is currently used only to serialize related
> > printk() calls. The only risk is that some messages might be
> > interleaved when it is ignored.
> >
> > I am not sure if this is a good idea though. It might create
> > another risk when the lock gets used to serialize more
> > things in the future and a race might create a real problem.
>
> With the printk series we are currently working on [0], only the panic
> CPU can store new printk messages anyway. So there would be nothing to
> synchronize against (and it could be safely ignored).
Right.
> kgdb uses the same technique to quiesce the CPUs. It does not use the
> printk_cpu_sync for this, but it is an example of a possible future
> usage not related to printk.
>
> My vote is to make it a NOP for the panic CPU and then keep an eye on
> any future uses.
Sounds good.
> Should I add this to v4 of [0]?
Let's not complicate this series any more. It is almost ready ;-)
We could do it by a separate patch in top of it or in another
patchset.
>
> [0] https://lore.kernel.org/lkml/20231214214201.499426-1-john.ogness@linutronix.de
Best Regards,
Petr
prev parent reply other threads:[~2024-02-07 13:04 UTC|newest]
Thread overview: 13+ messages / expand[flat|nested] mbox.gz Atom feed top
2023-12-20 21:15 Douglas Anderson
2023-12-20 21:15 ` [PATCH 1/4] watchdog/hardlockup: Adopt softlockup logic avoiding double-dumps Douglas Anderson
2023-12-20 21:15 ` [PATCH 2/4] watchdog/softlockup: Use printk_cpu_sync_get_irqsave() to serialize reporting Douglas Anderson
2023-12-22 7:13 ` lizhe.67
2023-12-22 9:30 ` John Ogness
2024-02-06 10:21 ` Petr Mladek
2023-12-20 21:15 ` [PATCH 3/4] watchdog/hardlockup: " Douglas Anderson
2023-12-22 9:42 ` John Ogness
2023-12-20 21:15 ` [PATCH 4/4] watchdog: If panicking and we dumped everything, don't re-enable dumping Douglas Anderson
2024-02-06 10:12 ` [PATCH 0/4] watchdog: Better handling of concurrent lockups Petr Mladek
2024-02-06 10:45 ` John Ogness
2024-02-06 19:31 ` Doug Anderson
2024-02-07 13:04 ` 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=ZcN_1DOwE4D6jrra@alley \
--to=pmladek@suse.com \
--cc=akpm@linux-foundation.org \
--cc=dianders@chromium.org \
--cc=john.ogness@linutronix.de \
--cc=kernelfans@gmail.com \
--cc=lecopzer.chen@mediatek.com \
--cc=linux-kernel@vger.kernel.org \
--cc=lizhe.67@bytedance.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®