From: "Luck, Tony" <tony.luck@intel.com>
To: Borislav Petkov <bp@alien8.de>
Cc: Breno Leitao <leitao@debian.org>,
"Rafael J. Wysocki" <rafael@kernel.org>,
Len Brown <lenb@kernel.org>, James Morse <james.morse@arm.com>,
"Moore, Robert" <robert.moore@intel.com>,
"linux-acpi@vger.kernel.org" <linux-acpi@vger.kernel.org>,
"linux-kernel@vger.kernel.org" <linux-kernel@vger.kernel.org>,
"acpica-devel@lists.linux.dev" <acpica-devel@lists.linux.dev>,
"kernel-team@meta.com" <kernel-team@meta.com>
Subject: Re: [PATCH] ghes: Track number of recovered hardware errors
Date: Mon, 14 Jul 2025 15:21:44 -0700 [thread overview]
Message-ID: <aHWC-J851eaHa_Au@agluck-desk3> (raw)
In-Reply-To: <20250714173556.GQaHU__LL6IUIPCDIW@fat_crate.local>
On Mon, Jul 14, 2025 at 07:35:56PM +0200, Borislav Petkov wrote:
> On Mon, Jul 14, 2025 at 05:33:45PM +0000, Luck, Tony wrote:
> > > If you're going to do this, then you can perhaps make this variable always
> > > present so that you don't need an export and call it "hardware_errors_count"
> > > or so and all machinery which deals with RAS - GHES, MCE, AER, bla, can
> > > increment it...
> >
> > Not sure I'd want to see all the different classes of errors bundled together
> > in a single count. I think MCE recovery is quite robust and rarely leads to
> > subsequent kernel problems.
>
> That's what I said. And a RAS tool can give that info already.
There's some value in it being in the kdump file, rather than having
to correlate data from multiple places. That's both time consuming
and error prone.
> But for some reason Breno still wants that info somewhere else.
So what about something like:
enum recovered_error_sources {
ERR_GHES,
ERR_MCE,
ERR_AER,
...
ERR_NUM_SOURCES
};
static struct recovered_error_info {
int num_recovered_errors;
time64_t last_recovered_error_timestamp;
} recovered_error_info[ERR_NUM_SOURCES];
void log_recovered_error(enum recovered_error_sources src)
{
recovered_error_info[src].num_recovered_errors++;
recovered_error_info[src].last_recovered_error_timestamp =
ktime_get_real_seconds();
}
EXPORT_SYMBOL_GPL(log_recovered_error);
PLus code to include that in VMCORE.
Then each subsystem just adds:
log_recovered_error(ERR_GHES);
or
log_recovered_error(ERR_MCE);
etc.
in the recovery path.
A count is just a hint. A count with a timestamp that is shortly
before a crash is a smoking gun.
-Tony
next prev parent reply other threads:[~2025-07-14 22:21 UTC|newest]
Thread overview: 30+ messages / expand[flat|nested] mbox.gz Atom feed top
2025-07-14 16:57 [PATCH] ghes: Track number of recovered hardware errors Breno Leitao
2025-07-14 17:10 ` Luck, Tony
2025-07-14 17:10 ` Borislav Petkov
2025-07-14 17:33 ` Luck, Tony
2025-07-14 17:35 ` Borislav Petkov
2025-07-14 22:21 ` Luck, Tony [this message]
2025-07-15 8:29 ` Borislav Petkov
2025-07-15 10:20 ` Breno Leitao
2025-07-15 10:31 ` Borislav Petkov
2025-07-15 12:02 ` Breno Leitao
2025-07-15 12:53 ` Borislav Petkov
2025-07-15 13:46 ` Shuai Xue
2025-07-15 15:09 ` Borislav Petkov
2025-07-16 2:05 ` Shuai Xue
2025-07-16 6:30 ` Mauro Carvalho Chehab
2025-07-15 17:25 ` Breno Leitao
2025-07-16 3:04 ` Shuai Xue
2025-07-16 12:42 ` Breno Leitao
2025-07-17 3:03 ` Shuai Xue
2025-07-17 12:06 ` Breno Leitao
2025-07-17 17:19 ` Luck, Tony
2025-07-17 17:39 ` Breno Leitao
2025-07-17 17:54 ` Luck, Tony
2025-07-15 10:07 ` Breno Leitao
2025-07-15 10:18 ` Borislav Petkov
2025-07-17 16:06 ` Breno Leitao
2025-07-17 17:29 ` Luck, Tony
2025-07-18 16:11 ` Breno Leitao
2025-07-18 17:36 ` Luck, Tony
2025-07-21 8:56 ` 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=aHWC-J851eaHa_Au@agluck-desk3 \
--to=tony.luck@intel.com \
--cc=acpica-devel@lists.linux.dev \
--cc=bp@alien8.de \
--cc=james.morse@arm.com \
--cc=kernel-team@meta.com \
--cc=leitao@debian.org \
--cc=lenb@kernel.org \
--cc=linux-acpi@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=rafael@kernel.org \
--cc=robert.moore@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;
as well as URLs for NNTP newsgroup(s).