mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: Sohil Mehta <sohil.mehta@intel.com>
To: Breno Leitao <leitao@debian.org>, Tony Luck <tony.luck@intel.com>,
	Borislav Petkov <bp@alien8.de>, Thomas Gleixner <tglx@kernel.org>,
	"Ingo Molnar" <mingo@redhat.com>,
	Dave Hansen <dave.hansen@linux.intel.com>, <x86@kernel.org>,
	"H. Peter Anvin" <hpa@zytor.com>, Qiuxu Zhuo <qzhuo@nvidia.com>,
	Qiuxu Zhuo <qiuxu.zhuo@intel.com>
Cc: <linux-edac@vger.kernel.org>, <linux-kernel@vger.kernel.org>,
	Rik van Riel <riel@surriel.com>, <kernel-team@meta.com>,
	<stable@vger.kernel.org>
Subject: Re: [PATCH v3 1/2] x86/mce: Restore rate limit on MCE logged message
Date: Fri, 13 Nov 2026 13:15:18 -0800	[thread overview]
Message-ID: <88cf2dd9-9308-44a2-a536-6285c9783c57@intel.com> (raw)
In-Reply-To: <20261113-mci_ratelimit-v3-1-ada38c5a6c88@debian.org>

On 11/13/2026 4:49 AM, Breno Leitao wrote:
> From: Rik van Riel <riel@surriel.com>
> 
> Commit ea324444ece9f ("x86/mce: Restore MCA polling interval halving")
> moved the "Machine check events logged" print from mce_notify_irq()
> into mce_log() and dropped its two-per-minute rate limit as a side
> effect.
> 
> A particularly unhappy system can spew out around 100 million
> of those "Machine check events logged" messages every hour,
> without that rate limit. A large fleet may have several unhappy
> systems, leaving the netcons infrastructure somewhat flustered.
> 
> Reinstate the rate limit we had before.
> 

Nit: How about avoiding the 'we' and saying:

  Reinstate the two-per-minute rate limit.

> Fixes: ea324444ece9f ("x86/mce: Restore MCA polling interval halving")
> Cc: stable@vger.kernel.org
> Signed-off-by: Rik van Riel <riel@surriel.com>
> Reviewed-by: Tony Luck <tony.luck@intel.com>
> Reviewed-by: Qiuxu Zhuo <qzhuo@nvidia.com>
> Reviewed-by: Breno Leitao <leitao@debian.org>
> Signed-off-by: Breno Leitao <leitao@debian.org>
> ---

Reviewed-by: Sohil Mehta <sohil.mehta@intel.com>

>  arch/x86/kernel/cpu/mce/core.c | 6 +++++-
>  1 file changed, 5 insertions(+), 1 deletion(-)
> 
> diff --git a/arch/x86/kernel/cpu/mce/core.c b/arch/x86/kernel/cpu/mce/core.c
> index 50b1614968be6a..06f858faf2b1cd 100644
> --- a/arch/x86/kernel/cpu/mce/core.c
> +++ b/arch/x86/kernel/cpu/mce/core.c
> @@ -150,8 +150,12 @@ EXPORT_PER_CPU_SYMBOL_GPL(injectm);
>  
>  void mce_log(struct mce_hw_err *err)
>  {
> +	/* Not more than two messages every minute */
> +	static DEFINE_RATELIMIT_STATE(ratelimit, 60*HZ, 2);
> +
>  	if (mce_gen_pool_add(err)) {
> -		pr_info(HW_ERR "Machine check events logged\n");
> +		if (__ratelimit(&ratelimit))
> +			pr_info(HW_ERR "Machine check events logged\n");
>  		irq_work_queue(&mce_irq_work);
>  	}
>  }
> 



  reply	other threads:[~2026-11-13 21:15 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2026-11-13 12:49 [PATCH v3 0/2] x86/mce: Rate-limit messages from corrected error floods Breno Leitao
2026-11-13 12:49 ` [PATCH v3 1/2] x86/mce: Restore rate limit on MCE logged message Breno Leitao
2026-11-13 21:15   ` Sohil Mehta [this message]
2026-11-13 12:49 ` [PATCH v3 2/2] x86/mce: Rate-limit the CMCI storm transition notices Breno Leitao
2026-11-13 15:38   ` Qiuxu (Leo) Zhuo
2026-11-13 21:20   ` Sohil Mehta

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=88cf2dd9-9308-44a2-a536-6285c9783c57@intel.com \
    --to=sohil.mehta@intel.com \
    --cc=bp@alien8.de \
    --cc=dave.hansen@linux.intel.com \
    --cc=hpa@zytor.com \
    --cc=kernel-team@meta.com \
    --cc=leitao@debian.org \
    --cc=linux-edac@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=mingo@redhat.com \
    --cc=qiuxu.zhuo@intel.com \
    --cc=qzhuo@nvidia.com \
    --cc=riel@surriel.com \
    --cc=stable@vger.kernel.org \
    --cc=tglx@kernel.org \
    --cc=tony.luck@intel.com \
    --cc=x86@kernel.org \
    /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

all inboxes | Powered by JetHome®