Re: [PATCH RESEND v2] x86/mce: Rate-limit the CMCI storm transition notices
From: Breno Leitao
Date: Fri Nov 13 2026 - 08:32:52 EST
On Thu, Nov 12, 2026 at 10:21:25AM -0800, Borislav Petkov wrote:
> On Thu, Nov 12, 2026 at 01:56:39AM -0800, Breno Leitao wrote:
> > void mce_track_storm(struct mce *mce)
> > {
> > struct mca_storm_desc *storm = this_cpu_ptr(&storm_desc);
> > @@ -150,13 +158,17 @@ void mce_track_storm(struct mce *mce)
> > if (storm->banks[mce->bank].in_storm_mode) {
> > if (history & GENMASK_ULL(STORM_END_POLL_THRESHOLD, 0))
> > return;
> > - printk_deferred(KERN_NOTICE "CPU%d BANK%d CMCI storm subsided\n", smp_processor_id(), mce->bank);
> > + if (__ratelimit(&storm_rs))
> > + printk_deferred(KERN_NOTICE "CPU%d BANK%d CMCI storm subsided\n",
> > + smp_processor_id(), mce->bank);
> > mce_handle_storm(mce->bank, false);
> > cmci_storm_end(mce->bank);
> > } else {
> > if (hweight64(history) < STORM_BEGIN_THRESHOLD)
> > return;
> > - printk_deferred(KERN_NOTICE "CPU%d BANK%d CMCI storm detected\n", smp_processor_id(), mce->bank);
> > + if (__ratelimit(&storm_rs))
> > + printk_deferred(KERN_NOTICE "CPU%d BANK%d CMCI storm detected\n",
> > + smp_processor_id(), mce->bank);
> > mce_handle_storm(mce->bank, true);
> > cmci_storm_begin(mce->bank);
> > }
>
> Should we merge all the MCE ratelimiting into a single effort?
>
> https://lore.kernel.org/r/20261108143751.3af49e48@fangorn
Sounds good. I will send v3 as one series: Rik's patch first, since it
is a stable fix and can go in on its own, and the storm notice ratelimit
on top of it.