mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: Yazen Ghannam <yazen.ghannam@amd.com>
To: <linux-pci@vger.kernel.org>
Cc: <linux-kernel@vger.kernel.org>,
	Bjorn Helgaas <helgaas@kernel.org>, <bhelgaas@google.com>,
	Lukas Wunner <lukas@wunner.de>,
	"Kuppuswamy Sathyanarayanan"
	<sathyanarayanan.kuppuswamy@linux.intel.com>,
	Jon Pan-Doh <pandoh@google.com>,
	Yazen Ghannam <yazen.ghannam@amd.com>
Subject: [PATCH v3 2/2] PCI/AER: Document ratelimit interval and burst values of 0
Date: Tue, 24 Nov 2026 21:28:46 -0600	[thread overview]
Message-ID: <20261125032846.4019744-2-yazen.ghannam@amd.com> (raw)
In-Reply-To: <20261123233859.GA1120797@bhelgaas>

The AER ratelimit ABI doesn't say what a burst of 0 does, or how it
interacts with an interval of 0.

___ratelimit() checks the interval first. An interval of 0 disables
ratelimiting, so every message is printed regardless of burst. With a
nonzero interval, a burst of 0 suppresses every message.

Document both cases for the correctable and non-fatal attributes.

Suggested-by: Bjorn Helgaas <bhelgaas@google.com>
Signed-off-by: Yazen Ghannam <yazen.ghannam@amd.com>
---
Applies on top of the pci/aer tip, after "PCI/AER: Enable baseline
capability error reporting", so it keeps that commit's capitalization.

New in v3: split out of v2 2/4, with the wording Bjorn suggested.
(Bjorn)

An LLM coding assistant helped adapt the suggested wording to each
attribute.

v2: https://lore.kernel.org/r/20261123165050.GA1741477@yaz-khff2.amd.com

 .../ABI/testing/sysfs-bus-pci-devices-aer     | 19 +++++++++++++------
 1 file changed, 13 insertions(+), 6 deletions(-)

diff --git a/Documentation/ABI/testing/sysfs-bus-pci-devices-aer b/Documentation/ABI/testing/sysfs-bus-pci-devices-aer
index 9e772e1ed9b3..0f193ccb0e2b 100644
--- a/Documentation/ABI/testing/sysfs-bus-pci-devices-aer
+++ b/Documentation/ABI/testing/sysfs-bus-pci-devices-aer
@@ -140,9 +140,10 @@ What:		/sys/bus/pci/devices/<dev>/aer/correctable_ratelimit_interval_ms
 Date:		May 2025
 KernelVersion:	6.16.0
 Contact:	linux-pci@vger.kernel.org
-Description:	Writing 0 disables Correctable Error log ratelimiting.
-		Writing a positive value sets the ratelimit interval in ms.
-		Default is DEFAULT_RATELIMIT_INTERVAL (5000 ms).
+Description:	Writing 0 disables Correctable Error log ratelimiting and
+		prints all messages, regardless of burst. Writing a
+		positive value sets the ratelimit interval in ms. Default
+		is DEFAULT_RATELIMIT_INTERVAL (5000 ms).
 
 What:		/sys/bus/pci/devices/<dev>/aer/correctable_ratelimit_burst
 Date:		May 2025
@@ -153,14 +154,17 @@ Description:	Ratelimit burst for correctable error logs. Writing a value
 		before ratelimiting. Reading gets the current ratelimit
 		burst. Default is DEFAULT_RATELIMIT_BURST (10).
 
+		Writing 0 never prints any messages (unless interval is
+		also 0, which prints all messages regardless of burst).
+
 What:		/sys/bus/pci/devices/<dev>/aer/nonfatal_ratelimit_interval_ms
 Date:		May 2025
 KernelVersion:	6.16.0
 Contact:	linux-pci@vger.kernel.org
 Description:	Writing 0 disables Non-Fatal Uncorrectable Error log
-		ratelimiting. Writing a positive value sets the ratelimit
-		interval in ms. Default is DEFAULT_RATELIMIT_INTERVAL
-		(5000 ms).
+		ratelimiting and prints all messages, regardless of burst.
+		Writing a positive value sets the ratelimit interval in ms.
+		Default is DEFAULT_RATELIMIT_INTERVAL (5000 ms).
 
 What:		/sys/bus/pci/devices/<dev>/aer/nonfatal_ratelimit_burst
 Date:		May 2025
@@ -171,3 +175,6 @@ Description:	Ratelimit burst for non-fatal uncorrectable error logs.
 		allowed per interval before ratelimiting. Reading gets the
 		current ratelimit burst. Default is DEFAULT_RATELIMIT_BURST
 		(10).
+
+		Writing 0 never prints any messages (unless interval is
+		also 0, which prints all messages regardless of burst).
-- 
2.55.0


  parent reply	other threads:[~2026-11-25  3:29 UTC|newest]

Thread overview: 19+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2026-11-10 21:56 [PATCH 0/4] AER sysfs fixes Yazen Ghannam
2026-11-10 21:56 ` [PATCH 1/4] MAINTAINERS: Add the AER sysfs ABI file to PCI SUBSYSTEM Yazen Ghannam
2026-11-10 21:56 ` [PATCH 2/4] PCI/AER: Clamp negative ratelimit burst to zero Yazen Ghannam
2026-11-20 18:10   ` Bjorn Helgaas
2026-11-20 21:13     ` Yazen Ghannam
2026-11-21  0:12       ` Bjorn Helgaas
2026-11-23 16:50         ` Yazen Ghannam
2026-11-23 23:38           ` Bjorn Helgaas
2026-11-24 18:05             ` Yazen Ghannam
2026-11-25  3:28             ` [PATCH v3 1/2] PCI/AER: Reject negative ratelimit interval and burst values Yazen Ghannam
2026-11-25  3:28             ` Yazen Ghannam [this message]
2026-11-10 21:56 ` [PATCH 3/4] PCI/AER: Report the ratelimit interval in milliseconds Yazen Ghannam
2026-11-18 16:39   ` Sang-Heon Jeon
2026-11-10 21:56 ` [PATCH 4/4] PCI/AER: Hide the "aer" sysfs directory on devices without AER Yazen Ghannam
2026-11-21  1:31   ` Bjorn Helgaas
2026-11-22 17:56     ` Lukas Wunner
2026-11-23 23:46       ` Bjorn Helgaas
2026-11-24  8:01         ` Lukas Wunner
2026-11-19  0:02 ` [PATCH 0/4] AER sysfs fixes Bjorn Helgaas

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=20261125032846.4019744-2-yazen.ghannam@amd.com \
    --to=yazen.ghannam@amd.com \
    --cc=bhelgaas@google.com \
    --cc=helgaas@kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-pci@vger.kernel.org \
    --cc=lukas@wunner.de \
    --cc=pandoh@google.com \
    --cc=sathyanarayanan.kuppuswamy@linux.intel.com \
    /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®