[PATCH] ghes: Track number of recovered hardware errors
Breno Leitao
leitao at debian.org
Mon Jul 21 18:56:03 AEST 2025
Hello Tony,
On Fri, Jul 18, 2025 at 05:36:50PM +0000, Luck, Tony wrote:
> > I found that I don't need to expose the metrics in vmcore info at all to
> > be able to read them from vmcore, given crash/drgn can read those
> > symbols.
> >
> > Global variable hwerror_tracking will be write-only during kernel
> > run-time, and only read during post morten analyzes. I am still not sure
> > if the compiler might not get rid of them completely, given no on reads.
> > I am wondering if I should EXPORT_SYMBOL_GPL(hwerror_tracking) to avoid
> > any optimization there.
>
> Thanks for fleshing this out into a patch. It looks very much like I
> imagined.
>
> I'd be amazed if a compiler did elide all this code and data because it
> noticed it was written but never read.
>
> Is the spinlock when logging really helping anything? You weren't
> worried about locking/atomics in your original patch because users
> mostly care about zero vs. non-zero (or maybe vs. "many"). If the
> count is slightly off when many logs happen, it may not matter.
>
> The spinlock doesn't help with the timestamp part at all.
Agree, precise number is not important there, and if there are
conflicts, it will not hurt the message.
Let me remove the spinlock completely them and send a new version.
Thanks for your support,
--breno
More information about the Linuxppc-dev
mailing list