Skip to content

watchdog: Better handling of concurrent lockups

Douglas Anderson lkml 1 version Applied

Status from this message: [merged mm-nonmm-stable] watchdog-if-panicking-and-we-dumped-everything-dont-re-enable-dumping.patch removed from -mm tree

Get series with b4
b4 am [email protected]

Versions newest first

  1. v1 Latest4 patches 8 repliesApplied 4/4

Patches in v1 All 4 applied

#Subject and filesSizeRepliesApplied
1/4watchdog/hardlockup: Adopt softlockup logic avoiding double-dumpskernel/watchdog.c+13 -70 repliesApplied
2/4watchdog/softlockup: Use printk_cpu_sync_get_irqsave() to serialize reportingkernel/watchdog.c+3 -33 repliesApplied
3/4watchdog/hardlockup: Use printk_cpu_sync_get_irqsave() to serialize reportingkernel/watchdog.c+13 -01 replyApplied
4/4watchdog: If panicking and we dumped everything, don't re-enable dumpingkernel/watchdog.c+4 -20 repliesApplied

Reviews trailers per patch

2 of 4 patches have a Reviewed-by or Acked-by.

PatchLi ZheJohn Ogness
1/4
2/4R-b R-b
3/4R-b
4/4

Trailers given in replies are filled; those carried in the patches from earlier versions are outlined with dashes.

Read the v1 thread

Cover letter [PATCH 0/4] watchdog: Better handling of concurrent lockups

When we get multiple lockups at roughly the same time, the output in the kernel logs can be very confusing since the reports about the lockups end up interleaved in the logs. There is some code in the kernel to try to handle this but it wasn't that complete.

Li Zhe recently made this a bit better for softlockups (specifically for the case where kernel.softlockup_all_cpu_backtrace is not set) in commit 9d02330abd3e ("softlockup: serialized softlockup's log"), but that only handled softlockup reports. Hardlockup reports still had similar issues.

This series also has a small fix to avoid dumping all stacks a second time in the case of a panic. This is a bit unrelated to the interleaving fixes but it does also improve the clarity of lockup reports.

Douglas Anderson (4):
watchdog/hardlockup: Adopt softlockup logic avoiding double-dumps watchdog/softlockup: Use printk_cpu_sync_get_irqsave() to serialize
reporting
watchdog/hardlockup: Use printk_cpu_sync_get_irqsave() to serialize
reporting
watchdog: If panicking and we dumped everything, don't re-enable
dumping

 kernel/watchdog.c | 43 ++++++++++++++++++++++++++++++++-----------
 1 file changed, 32 insertions(+), 11 deletions(-)
Signature · 1 line
2.43.0.472.g3155946c3a-goog