Skip to content

vmcoreinfo: Expose hardware error recovery statistics via sysfs

Breno Leitao kexec linux-acpi linux-arm-kernel lkml 2 versions – In review

Get series with b4
b4 am [email protected] change-id 20260129-vmcoreinfo_sysfs-ff4687979cd5

Versions newest first

  1. v2 Latest2 patches 7 repliesIn review
  2. v11 patch 4 repliesSuperseded

Changes in v2 from the cover letter

- Renamed vmcore_stats to hwerr_stats
- Separate each subsystem in multiple sysfs entries, one per file
- Link to v1: https://patch.msgid.link/[email protected]

Patches in v2 No applies recorded yet

#Subject and filesSizeRepliesApplied
1/2vmcoreinfo: expose hardware error recovery statistics via sysfskernel/vmcore_info.c+55 -05 replies
2/2docs: add ABI documentation for /sys/kernel/hwerr_recovery_stats/Documentation/ABI/testing/sysfs-kernel-hwerr_recovery_stats Documentation/driver-api/hw-recoverable-errors.rst+49 -10 replies

Reviews trailers per patch

1 of 2 patches has a Reviewed-by or Acked-by.

PatchBaoquan He
1/2A-b
2/2

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

Read the v2 thread

Cover letter [PATCH v2 0/2] vmcoreinfo: Expose hardware error recovery statistics via sysfs

The kernel already tracks recoverable hardware errors (CPU, memory, PCI, CXL, etc.) in the hwerr_data array for vmcoreinfo crash dump analysis. However, this data is only accessible after a crash.

This series adds a sysfs directory at /sys/kernel/hwerr_recovery_stats/ to expose these statistics at runtime, allowing monitoring tools to track hardware health without requiring a kernel crash.

The directory contains one file per error subsystem:
/sys/kernel/hwerr_recovery_stats/{cpu, memory, pci, cxl, others}

Each file contains a single integer representing the error count.

This is useful for:
- Proactive detection of failing hardware components
- Time-series tracking of recoverable errors
- System health monitoring in cloud environments

To: [email protected]
Cc: [email protected]
Cc: [email protected]
Cc: [email protected]
To: [email protected]
Cc: [email protected]
Cc: [email protected]
Cc: [email protected]
Cc: [email protected]
Cc: [email protected]
Cc: [email protected]
Cc: [email protected]

---
Changes in v2:
- Renamed vmcore_stats to hwerr_stats
- Separate each subsystem in multiple sysfs entries, one per file
- Link to v1: https://patch.msgid.link/[email protected]

---
Breno Leitao (2):
vmcoreinfo: expose hardware error recovery statistics via sysfs
docs: add ABI documentation for /sys/kernel/hwerr_recovery_stats/

 .../ABI/testing/sysfs-kernel-hwerr_recovery_stats  | 47 ++++++++++++++++++
 Documentation/driver-api/hw-recoverable-errors.rst |  3 +-
 kernel/vmcore_info.c                               | 55 ++++++++++++++++++++++
 3 files changed, 104 insertions(+), 1 deletion(-)

---
base-commit: 4d310797262f0ddf129e76c2aad2b950adaf1fda
change-id: 20260129-vmcoreinfo_sysfs-ff4687979cd5

Best regards,

Signature · 1 line
Breno Leitao <[email protected]>