From: Petr Mladek <pmladek@suse.com>
To: lizhe.67@bytedance.com
Cc: dianders@chromium.org, akpm@linux-foundation.org,
lecopzer.chen@mediatek.com, kernelfans@gmail.com,
linux-kernel@vger.kernel.org, lizefan.x@bytedance.com
Subject: Re: [PATCH v3] softlockup: serialized softlockup's log
Date: Mon, 27 Nov 2023 18:32:23 +0100 [thread overview]
Message-ID: <ZWTSp70g_PLH963C@alley> (raw)
In-Reply-To: <20231123084022.10302-1-lizhe.67@bytedance.com>
On Thu 2023-11-23 16:40:22, lizhe.67@bytedance.com wrote:
> From: Li Zhe <lizhe.67@bytedance.com>
>
> If multiple CPUs trigger softlockup at the same time with
> 'softlockup_all_cpu_backtrace=0', the softlockup's logs will appear
> staggeredly in dmesg, which will affect the viewing of the logs for
> developer. Since the code path for outputting softlockup logs is not
> a kernel hotspot and the performance requirements for the code are
> not strict, locks are used to serialize the softlockup log output to
> improve the readability of the logs.
>
> Signed-off-by: Li Zhe <lizhe.67@bytedance.com>
I do not feel fully comfortable with adding a lock into a code path
which reports system lockups. There might already be a deadlock on
the system and yet another lock would not make things easier.
On the other hand, the added spinlock looks pretty safe:
+ It synchronizes only watchdog_timer_fn() calls against each other.
watchdog_timer_fn() could not be nested.
+ The locked code seems to be synchronized only by RCU
and does not wait for other CPUs to finish something.
I haven't found any real deadlock scenario. Feel free
to use:
Reviewed-by: Petr Mladek <pmladek@suse.com>
Best Regards,
Petr
next prev parent reply other threads:[~2023-11-27 17:32 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2023-11-23 8:40 [PATCH v3] softlockup: serialized softlockup's log lizhe.67
2023-11-27 17:32 ` Petr Mladek [this message]
2023-11-27 21:47 ` Doug Anderson
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=ZWTSp70g_PLH963C@alley \
--to=pmladek@suse.com \
--cc=akpm@linux-foundation.org \
--cc=dianders@chromium.org \
--cc=kernelfans@gmail.com \
--cc=lecopzer.chen@mediatek.com \
--cc=linux-kernel@vger.kernel.org \
--cc=lizefan.x@bytedance.com \
--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