linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCHv6 0/2] *** Detect interrupt storm in softlockup ***
@ 2024-02-08 12:54 Bitao Hu
  2024-02-08 12:54 ` [PATCHv6 1/2] watchdog/softlockup: low-overhead detection of interrupt Bitao Hu
                   ` (2 more replies)
  0 siblings, 3 replies; 15+ messages in thread
From: Bitao Hu @ 2024-02-08 12:54 UTC (permalink / raw)
  To: dianders, akpm, pmladek, kernelfans, liusong; +Cc: linux-kernel, yaoma

Hi, guys.
I have implemented a low-overhead method for detecting interrupt
storm in softlockup. Please review it, all comments are welcome.

Changes from v5 to v6:

- Use "./scripts/checkpatch.pl --strict" to get a few extra
style nits and fix them.

- Squash patch #3 into patch #1, and wrapp the help text to
80 columns.

- Sort existing headers alphabetically in watchdog.c

- Drop "softlockup_hardirq_cpus", just read "hardirq_counts"
and see if it's non-NULL.

- Store "nr_irqs" in a local variable.

- Simplify the calculation of "cpu_diff".

Changes from v4 to v5:

- Rearranging variable placement to make code look neater.

Changes from v3 to v4:

- Renaming some variable and function names to make the code logic
more readable.

- Change the code location to avoid predeclaring.

- Just swap rather than a double loop in tabulate_irq_count.

- Since nr_irqs has the potential to grow at runtime, bounds-check
logic has been implemented.

- Add SOFTLOCKUP_DETECTOR_INTR_STORM Kconfig knob.

Changes from v2 to v3:

- From Liu Song, using enum instead of macro for cpu_stats, shortening
the name 'idx_to_stat' to 'stats', adding 'get_16bit_precesion' instead
of using right shift operations, and using 'struct irq_counts'.

- From kernel robot test, using '__this_cpu_read' and '__this_cpu_write'
instead of accessing to an per-cpu array directly, in order to avoid
this warning.
'sparse: incorrect type in initializer (different modifiers)'

Changes from v1 to v2:

- From Douglas, optimize the memory of cpustats. With the maximum number
of CPUs, that's now this.
2 * 8192 * 4 + 1 * 8192 * 5 * 4 + 1 * 8192 = 237,568 bytes.

- From Liu Song, refactor the code format and add necessary comments.

- From Douglas, use interrupt counts instead of interrupt time to
determine the cause of softlockup.

- Remove the cmdline parameter added in PATCHv1.

Bitao Hu (2):
  watchdog/softlockup: low-overhead detection of interrupt
  watchdog/softlockup: report the most frequent interrupts

 kernel/watchdog.c | 244 +++++++++++++++++++++++++++++++++++++++++++++-
 lib/Kconfig.debug |  13 +++
 2 files changed, 253 insertions(+), 4 deletions(-)

-- 
2.37.1 (Apple Git-137.1)


^ permalink raw reply	[flat|nested] 15+ messages in thread

end of thread, other threads:[~2024-02-11 23:46 UTC | newest]

Thread overview: 15+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2024-02-08 12:54 [PATCHv6 0/2] *** Detect interrupt storm in softlockup *** Bitao Hu
2024-02-08 12:54 ` [PATCHv6 1/2] watchdog/softlockup: low-overhead detection of interrupt Bitao Hu
2024-02-08 16:03   ` Doug Anderson
2024-02-09 13:35   ` Petr Mladek
2024-02-11 15:35     ` Bitao Hu
2024-02-11 23:46     ` Doug Anderson
2024-02-10 13:32   ` Liu Song
2024-02-08 12:54 ` [PATCHv6 2/2] watchdog/softlockup: report the most frequent interrupts Bitao Hu
2024-02-08 16:03   ` Doug Anderson
2024-02-11 15:41     ` Bitao Hu
2024-02-09 14:39   ` Petr Mladek
2024-02-11 15:36     ` Bitao Hu
2024-02-10 13:33   ` Liu Song
2024-02-09 14:48 ` [PATCHv6 0/2] *** Detect interrupt storm in softlockup *** Petr Mladek
2024-02-11 15:36   ` Bitao Hu

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).