lkml.org 
[lkml]   [2023]   [Nov]   [27]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: [PATCH v3] softlockup: serialized softlockup's log
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

\
 
 \ /
  Last update: 2023-11-27 18:33    [W:0.049 / U:0.104 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site