Linux-ARM-Kernel Archive on lore.kernel.org
 help / color / mirror / Atom feed
From: Baoquan He <baoquan.he@linux.dev>
To: Breno Leitao <leitao@debian.org>
Cc: Baoquan He <bhe@redhat.com>,
	akpm@linux-foundation.org, linux-kernel@vger.kernel.org,
	kexec@lists.infradead.org, linux-arm-kernel@lists.infradead.org,
	linux-acpi@vger.kernel.org, dyoung@redhat.com,
	tony.luck@intel.com, xueshuai@linux.alibaba.com,
	vgoyal@redhat.com, zhiquan1.li@intel.com, olja@meta.com,
	kernel-team@meta.com
Subject: Re: [PATCH v2 1/2] vmcoreinfo: expose hardware error recovery statistics via sysfs
Date: Fri, 10 Jul 2026 19:03:07 +0800	[thread overview]
Message-ID: <alDRawveM-auCHwB@MiWiFi-R3L-srv> (raw)
In-Reply-To: <ak0JSScR3EYgLEf9@gmail.com>

On 07/07/26 at 07:13am, Breno Leitao wrote:
> Hello Baoquan,
> 
> On Wed, Feb 11, 2026 at 10:01:05AM +0800, Baoquan He wrote:
> > On 02/02/26 at 06:27am, Breno Leitao wrote:
> > > Add a sysfs directory at /sys/kernel/hwerr_recovery_stats/ to expose
> > > hardware error recovery statistics that are already tracked by the
> > > kernel. This allows userspace monitoring tools to track recovered
> > > hardware errors without requiring kernel crashes.
> > > 
> > > This is useful to track recoverable hardware errors in a time series,
> > > even if the host doesn't crash.
> > > 
> > > The sysfs directory contains one file per error subsystem:
> > > 
> > >   /sys/kernel/hwerr_recovery_stats/cpu     - CPU-related errors (MCE, ARM errors)
> > >   /sys/kernel/hwerr_recovery_stats/memory  - Memory-related errors
> > >   /sys/kernel/hwerr_recovery_stats/pci     - PCI/PCIe AER non-fatal errors
> > >   /sys/kernel/hwerr_recovery_stats/cxl     - CXL errors
> > >   /sys/kernel/hwerr_recovery_stats/others  - Other hardware errors
> > > 
> > > Each file contains a single integer representing the count of recovered
> > > errors for that subsystem.
> > > 
> > > These statistics provide visibility into the health of the system's
> > > hardware and can be used by system administrators to proactively detect
> > > failing components before they cause system crashes.
> > > 
> > > Signed-off-by: Breno Leitao <leitao@debian.org>
> > > ---
> > >  kernel/vmcore_info.c | 55 ++++++++++++++++++++++++++++++++++++++++++++++++++++
> > >  1 file changed, 55 insertions(+)
> > > 
> > > diff --git a/kernel/vmcore_info.c b/kernel/vmcore_info.c
> > > index e2784038bbed7..b7fcd21be7c59 100644
> > > --- a/kernel/vmcore_info.c
> > > +++ b/kernel/vmcore_info.c
> > 
> > Since we agreed hwerr_recovery_stats has nothing to do with vmcore, it
> > seems inappropriate to put its sysfs handling code in
> > kernel/vmcore_info.c. File kernel/vmcore_info.c is only used to build
> > vmcore info for later vmcore dumping. And hwerr_log_error_type() should
> > not be put in kernel/vmcore_info.c. either. I didn't check this
> > carefully before, sorry. Please reconsider if these can be handled better.
> 
> I've sent an RFC to move it to RAS code, which I think it belongs
> better. Does it make more sense?
> 
> https://lore.kernel.org/all/20260707-hwerr-ras-v1-1-4aea4a79d085@debian.org/

Dude, you pinged me but didn't add me in patch posting thread. It at
least should be CC-ed to kexec mailing list since there's code change in
kernel/vmcoreinfo.c.

Anyway, I am glad to see it's been taken out of vmcoreinfo.c,
which is going in the right way from kdump side. For its migrating
into driver folder, leave it to the relevant reviewer to review and
decide.

For kdump part,

Acked-by: Baoquan He <baoquan.he@linux.dev>

Thanks
Baoquan


  reply	other threads:[~2026-07-10 11:03 UTC|newest]

Thread overview: 8+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2026-02-02 14:27 [PATCH v2 0/2] vmcoreinfo: Expose hardware error recovery statistics via sysfs Breno Leitao
2026-02-02 14:27 ` [PATCH v2 1/2] vmcoreinfo: expose " Breno Leitao
2026-02-11  2:01   ` Baoquan He
2026-07-07 14:13     ` Breno Leitao
2026-07-10 11:03       ` Baoquan He [this message]
2026-02-02 14:27 ` [PATCH v2 2/2] docs: add ABI documentation for /sys/kernel/hwerr_recovery_stats/ Breno Leitao
2026-02-10  9:11 ` [PATCH v2 0/2] vmcoreinfo: Expose hardware error recovery statistics via sysfs Breno Leitao
2026-02-10 18:46   ` Andrew Morton

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=alDRawveM-auCHwB@MiWiFi-R3L-srv \
    --to=baoquan.he@linux.dev \
    --cc=akpm@linux-foundation.org \
    --cc=bhe@redhat.com \
    --cc=dyoung@redhat.com \
    --cc=kernel-team@meta.com \
    --cc=kexec@lists.infradead.org \
    --cc=leitao@debian.org \
    --cc=linux-acpi@vger.kernel.org \
    --cc=linux-arm-kernel@lists.infradead.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=olja@meta.com \
    --cc=tony.luck@intel.com \
    --cc=vgoyal@redhat.com \
    --cc=xueshuai@linux.alibaba.com \
    --cc=zhiquan1.li@intel.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