Re: [PATCH 2/2] x86/mce: Add mce=panic_on_ce_count to panic on a corrected error flood
From: Borislav Petkov
Date: Tue Aug 25 2026 - 12:17:06 EST
On Tue, Aug 25, 2026 at 03:27:55PM +0000, Luck, Tony wrote:
> > > I chatted with someone internally. They'd be very interested in being
> > > able to see these running counts via some /sys files.
> > >
> > > Perhaps your use case would be better for that too? Rather than:
> > >
> > > "Everything is fine"
> >
> > Sounds good, I will restructure v2 that way: export the running counts
> > first, and add the panic on top as a separate patch.
> >
> > The count is already kept per CPU and per bank in struct storm_bank, so
> > the natural fit is one read-only file per bank, next to the existing
> > bank<N> knobs:
> >
> > /sys/devices/system/machinecheck/machinecheckX/ce_count<N>
> >
> > Is this the right approach?
>
> Breno,
>
> Yes, that looks like a natural place to expose the running counts.
>
> I'd argue that the files should be read/write. My rationale is that corrected
> error counts may be increasing slowly over time for transient errors caused
> by particle strikes. If a system runs for many months, it might reach the
> threshold and trigger a panic. Allowing the system administrator to zero
> the counts would avoid this.
How are you going to handle this on a large fleet? Surely not log into every
box. IOW, if anything this should be automatic and not a sysfs knob.
Why isn't this whole effort part of the drivers/ras/cec.c thing where we can
do all kinds of configurable policy and so on and which is exactly for things
like shutting up banks and not overflowing dmesg and memory_failure-ing pages
and so on?
Why isn't the strategy here page offlining and shutting up the source of the
error instead of doing silly counting and not doing anything to contain the
errors in the first place?
Weird...
--
Regards/Gruss,
Boris.
https://people.kernel.org/tglx/notes-about-netiquette