From: Shuai Xue <xueshuai@linux.alibaba.com>
To: Breno Leitao <leitao@debian.org>, Tony Luck <tony.luck@intel.com>,
Borislav Petkov <bp@alien8.de>
Cc: "Rafael J. Wysocki" <rafael@kernel.org>,
Len Brown <lenb@kernel.org>, James Morse <james.morse@arm.com>,
Robert Moore <robert.moore@intel.com>,
Thomas Gleixner <tglx@linutronix.de>,
Ingo Molnar <mingo@redhat.com>,
Dave Hansen <dave.hansen@linux.intel.com>,
x86@kernel.org, "H. Peter Anvin" <hpa@zytor.com>,
Hanjun Guo <guohanjun@huawei.com>,
Mauro Carvalho Chehab <mchehab@kernel.org>,
Mahesh J Salgaonkar <mahesh@linux.ibm.com>,
Oliver O'Halloran <oohall@gmail.com>,
Bjorn Helgaas <bhelgaas@google.com>,
linux-acpi@vger.kernel.org, linux-kernel@vger.kernel.org,
acpica-devel@lists.linux.dev, osandov@osandov.com,
konrad.wilk@oracle.com, linux-edac@vger.kernel.org,
linuxppc-dev@lists.ozlabs.org, linux-pci@vger.kernel.org,
kernel-team@meta.com
Subject: Re: [PATCH v3] vmcoreinfo: Track and log recoverable hardware errors
Date: Fri, 25 Jul 2025 15:40:58 +0800 [thread overview]
Message-ID: <fdb5dced-ea5a-48b8-bbb4-fc3ade7f3df8@linux.alibaba.com> (raw)
In-Reply-To: <4qh2wbcbzdajh2tvki26qe4tqjazmyvbn7v7aqqhkxpitdrexo@ucch4ppo7i4e>
在 2025/7/24 21:34, Breno Leitao 写道:
> Hello Shuai,
>
> On Thu, Jul 24, 2025 at 04:00:09PM +0800, Shuai Xue wrote:
>> 在 2025/7/23 00:56, Breno Leitao 写道:
>>> Introduce a generic infrastructure for tracking recoverable hardware
>>> errors (HW errors that did not cause a panic) and record them for vmcore
>>> consumption. This aids post-mortem crash analysis tools by preserving
>>> a count and timestamp for the last occurrence of such errors.
>>>
>>> Add centralized logging for three common sources of recoverable hardware
>>> errors:
>>
>> The term "recoverable" is highly ambiguous. Even within the x86
>> architecture, different vendors define errors differently. I'm not
>> trying to be pedantic about classification. As far as I know, for 2-bit
>> memory errors detected by scrub, AMD defines them as deferred errors
>> (DE) and handles them with log_error_deferred, while Intel uses
>> machine_check_poll. For 2-bit memory errors consumed by processes,
>> both Intel and AMD use MCE handling via do_machine_check(). Does your
>> HWERR_RECOV_MCE only focus on synchronous UE errors handled in
>> do_machine_check? What makes it special?
>
> I understand that deferred errors (DE) detected by memory scrubbing are
> typically silent and may not significantly impact system stability. In
> other words, I’m not convinced that including DE metrics in crash dumps
> would be helpful for correlating crashes with hardware issues—it might
> just add noise.
>
> Do you think it would be valuable to also log these events within
> log_error_deferred()?
Not really, as you meationed, the DE is typically silent in backgroud.
But I hope it is well documented.
>
>>> - if (ghes_severity(estatus->error_severity) >= GHES_SEV_PANIC)
>>> + sev = ghes_severity(estatus->error_severity);
>>> + if (sev == GHES_SEV_RECOVERABLE || sev == GHES_SEV_CORRECTED)
>>> + hwerr_log_error_type(HWERR_RECOV_GHES);
>>
>> APEI does not define an error type named GHES. GHES is just a kernel
>> driver name. Many hardware error types can be handled in GHES (see
>> ghes_do_proc), for example, AER is routed by GHES when firmware-first
>> mode is used. As far as I know, firmware-first mode is commonly used in
>> production. Should GHES errors be categorized into AER, memory, and CXL
>> memory instead?
>
> I also considered slicing the data differently initially, but then
> realized it would add more complexity than necessary for my needs.
>
> If you believe we should further subdivide the data, I’m happy to do so.
>
> You’re suggesting a structure like this, which would then map to the
> corresponding CPER_SEC_ sections:
>
> enum hwerr_error_type {
> HWERR_RECOV_AER, // maps to CPER_SEC_PCIE
> HWERR_RECOV_MCE, // maps to default MCE + CPER_SEC_PCIE
CPER_SEC_PCIE is typo?
> HWERR_RECOV_CXL, // maps to CPER_SEC_CXL_*
> HWERR_RECOV_MEMORY, // maps to CPER_SEC_PLATFORM_MEM
> }
>
> Additionally, what about events related to CPU, Firmware, or DMA
> errors—for example, CPER_SEC_PROC, CPER_SEC_FW, CPER_SEC_DMAR? Should we
> include those in the classification as well?
I would like to split a error from ghes to its own type,
it sounds more reasonable. I can not tell what happened from HWERR_RECOV_AERat all :(
>
>
> Thanks for your review and for the ongoing discussion!
> --breno
Thanks.
Shuai
next prev parent reply other threads:[~2025-07-25 7:41 UTC|newest]
Thread overview: 17+ messages / expand[flat|nested] mbox.gz Atom feed top
2025-07-22 16:56 [PATCH v3] vmcoreinfo: Track and log recoverable hardware errors Breno Leitao
2025-07-23 14:28 ` kernel test robot
2025-07-23 15:36 ` Breno Leitao
2025-07-23 19:00 ` Borislav Petkov
2025-07-23 23:21 ` Huang, Kai
2025-07-24 8:00 ` Shuai Xue
2025-07-24 13:34 ` Breno Leitao
2025-07-25 7:40 ` Shuai Xue [this message]
2025-07-25 16:16 ` Breno Leitao
2025-07-28 1:08 ` Shuai Xue
2025-07-29 13:48 ` Breno Leitao
2025-07-30 2:13 ` Shuai Xue
2025-07-30 13:11 ` Breno Leitao
2025-07-30 13:50 ` Shuai Xue
2025-07-30 17:16 ` Breno Leitao
2025-07-30 16:21 ` Mauro Carvalho Chehab
2025-07-30 17:22 ` Breno Leitao
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=fdb5dced-ea5a-48b8-bbb4-fc3ade7f3df8@linux.alibaba.com \
--to=xueshuai@linux.alibaba.com \
--cc=acpica-devel@lists.linux.dev \
--cc=bhelgaas@google.com \
--cc=bp@alien8.de \
--cc=dave.hansen@linux.intel.com \
--cc=guohanjun@huawei.com \
--cc=hpa@zytor.com \
--cc=james.morse@arm.com \
--cc=kernel-team@meta.com \
--cc=konrad.wilk@oracle.com \
--cc=leitao@debian.org \
--cc=lenb@kernel.org \
--cc=linux-acpi@vger.kernel.org \
--cc=linux-edac@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-pci@vger.kernel.org \
--cc=linuxppc-dev@lists.ozlabs.org \
--cc=mahesh@linux.ibm.com \
--cc=mchehab@kernel.org \
--cc=mingo@redhat.com \
--cc=oohall@gmail.com \
--cc=osandov@osandov.com \
--cc=rafael@kernel.org \
--cc=robert.moore@intel.com \
--cc=tglx@linutronix.de \
--cc=tony.luck@intel.com \
--cc=x86@kernel.org \
/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