[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <kw7mwmca3ir4nfyofumqiack5sht3aisdchevykdtmlio6xo7z@5xbdibpqvqix>
Date: Thu, 17 Jul 2025 09:06:38 -0700
From: Breno Leitao <leitao@...ian.org>
To: "Luck, Tony" <tony.luck@...el.com>
Cc: Borislav Petkov <bp@...en8.de>,
"Rafael J. Wysocki" <rafael@...nel.org>, Len Brown <lenb@...nel.org>, James Morse <james.morse@....com>,
"Moore, Robert" <robert.moore@...el.com>, "linux-acpi@...r.kernel.org" <linux-acpi@...r.kernel.org>,
"linux-kernel@...r.kernel.org" <linux-kernel@...r.kernel.org>, "acpica-devel@...ts.linux.dev" <acpica-devel@...ts.linux.dev>,
"kernel-team@...a.com" <kernel-team@...a.com>
Subject: Re: [PATCH] ghes: Track number of recovered hardware errors
Hello Tony,
On Mon, Jul 14, 2025 at 03:21:44PM -0700, Luck, Tony wrote:
> > But for some reason Breno still wants that info somewhere else.
>
> So what about something like:
This is a way better suggestion than what I propose and it seems that
Shuai also liked it.
That said, I am playing with it and it is looking promissing. I liked
Borislav idea of having an always-present array and use your error
sources to index the array.
> static struct recovered_error_info {
> int num_recovered_errors;
> time64_t last_recovered_error_timestamp;
> } recovered_error_info[ERR_NUM_SOURCES];
I know naming is hard. Playing with it, I thought about the
hwerror_tracking as the "name" for this feature. Does it sound ok?
> 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);
Where do you think this code should be? I suppose we have a few options:
1) Maybe a driver called hwerror_tracking in drivers/ directory
- Pro: Code is self-contained
- Cons: This will require a CONFIG_HWERROR_TRACKING, around. Also
it will create some inter dependency of drivers.
2) A hwerror_tracking.c error in kernel/ and have it always enabled
- Pro: This is always available, and doesn't depend on the CONFIG dance
- Cons: There is no way to disable it (?)
3) In some pre-existing file.
Any opinion about it?
Thanks
--breno
Powered by blists - more mailing lists