From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from lists.ozlabs.org (lists.ozlabs.org [112.213.38.117]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.lore.kernel.org (Postfix) with ESMTPS id 7BE67C54E90 for ; Wed, 21 May 2025 23:06:46 +0000 (UTC) Received: from boromir.ozlabs.org (localhost [127.0.0.1]) by lists.ozlabs.org (Postfix) with ESMTP id 4b2n9c6j9Xz2yf9; Thu, 22 May 2025 09:06:44 +1000 (AEST) Authentication-Results: lists.ozlabs.org; arc=none smtp.remote-ip="2604:1380:45d1:ec00::3" ARC-Seal: i=1; a=rsa-sha256; d=lists.ozlabs.org; s=201707; t=1747868804; cv=none; b=lpuPTQHIB4suju26pYUIcohyUmqdvWRKFoi34Jip12BZDycjupG8AJEWxl+vmiE1Ss81fTnjQgvSl8uKGhU7oB5QBe5XvDTK3MmV8eys1le5qI+3z/NNxzDxfDTR2SSDOzKiOUHs0G4/UbpVUGM056py3HJDCNMvA7XKzsFCruAHsX7YHKVs/+7gmc2M+tauCqrgwKoh3TUkaBPa65XYGiVWorQP8oApVl/11JRpQMSgPMN6j/LS5IB0XLtiSdIYm1IUcnhdShFiGm7gDXozU5uQXQtw4LZPwlqpzSdB5Vm+uxkLioHUFcVNqL8X59Yfk5SoX4wo/t5ZEfMhjBuG6g== ARC-Message-Signature: i=1; a=rsa-sha256; d=lists.ozlabs.org; s=201707; t=1747868804; c=relaxed/relaxed; bh=aBBnhscgYOw23uomK9YvENoEMVX+IkCNI73cf8rAgGw=; h=Date:From:To:Cc:Subject:Message-ID:MIME-Version:Content-Type: Content-Disposition:In-Reply-To; b=QbZ9h3mN4k3ywF9I2XHzqJXyn51gLMMIRuJvvIwC5yaiPjGSX6Cefp0gXFdSmy5P7EX9mSEBCIMqx1bkE0PlkpYnCwn088vJpp3bj707J99HymttUUPRWWjUF33/cLU8BHRmi4wgy8y/ELIeNU6xZ6ivJ/E3JggUt1gOel2ej4AMegh5+8ycYgABZBa5mLWnSBBwxbwmwDNte/crvcer/cP+Yb19CCyeW/PoEjxvzs2lfbSDu96MdfOTdjLYxAqRzaf3OiA1om/cRY34N3G5W80vszZ+VsRszHv6ZjRplZubb+0MWeqDYh53IsfQrHwa4v0K+2bmMY5ZILlwHEs+qg== ARC-Authentication-Results: i=1; lists.ozlabs.org; dmarc=pass (p=quarantine dis=none) header.from=kernel.org; dkim=pass (2048-bit key; unprotected) header.d=kernel.org header.i=@kernel.org header.a=rsa-sha256 header.s=k20201202 header.b=SsUde9Z2; dkim-atps=neutral; spf=pass (client-ip=2604:1380:45d1:ec00::3; helo=nyc.source.kernel.org; envelope-from=helgaas@kernel.org; receiver=lists.ozlabs.org) smtp.mailfrom=kernel.org Authentication-Results: lists.ozlabs.org; dmarc=pass (p=quarantine dis=none) header.from=kernel.org Authentication-Results: lists.ozlabs.org; dkim=pass (2048-bit key; unprotected) header.d=kernel.org header.i=@kernel.org header.a=rsa-sha256 header.s=k20201202 header.b=SsUde9Z2; dkim-atps=neutral Authentication-Results: lists.ozlabs.org; spf=pass (sender SPF authorized) smtp.mailfrom=kernel.org (client-ip=2604:1380:45d1:ec00::3; helo=nyc.source.kernel.org; envelope-from=helgaas@kernel.org; receiver=lists.ozlabs.org) Received: from nyc.source.kernel.org (nyc.source.kernel.org [IPv6:2604:1380:45d1:ec00::3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (2048 bits) server-digest SHA256) (No client certificate requested) by lists.ozlabs.org (Postfix) with ESMTPS id 4b2n9c0wXhz2yf4 for ; Thu, 22 May 2025 09:06:44 +1000 (AEST) Received: from smtp.kernel.org (transwarp.subspace.kernel.org [100.75.92.58]) by nyc.source.kernel.org (Postfix) with ESMTP id B7206A4F439; Wed, 21 May 2025 23:06:41 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id 369B4C4CEEA; Wed, 21 May 2025 23:06:41 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1747868801; bh=NEfRGNGqd+jQ4ZBng1dfzvjrKmSVR+/dtJx0zlR93Ws=; h=Date:From:To:Cc:Subject:In-Reply-To:From; b=SsUde9Z2FPViWIrd9w4gBW4lxhWaZCxVaNRIUwfdG98emO4Q0nTSUmtVGXUa/K62u 4kDvqYBFgk5Vjli1GmKSnXNG4CCjkJGZlKPPLZ0hPDXPQCA7vKajIGUWEHeubI/6IP T3+Xzs0eQp22gYrGHaPWQVYwKpqEuMPINy2sIw5udEBO4KjiUXbfhZ8rXJoJrTrohp aZRTX4UJs/vAqJ5qq0sxK4MBdIZiOapIz0SWEPizirFpYHQrC1plIDGXVtml7qj9x6 PCZVBQGvP4tg6eiVTFEXiLhWk7M90tWuK+VjhuxZRZH5dYupM94ZZhZcJjt9KUFzL2 TnwGOmuLP9dRw== Date: Wed, 21 May 2025 18:06:39 -0500 From: Bjorn Helgaas To: Sathyanarayanan Kuppuswamy Cc: linux-pci@vger.kernel.org, Jon Pan-Doh , Karolina Stolarek , Weinan Liu , Martin Petersen , Ben Fuller , Drew Walton , Anil Agrawal , Tony Luck , Ilpo =?utf-8?B?SsOkcnZpbmVu?= , Lukas Wunner , Jonathan Cameron , Sargun Dhillon , "Paul E . McKenney" , Mahesh J Salgaonkar , Oliver O'Halloran , Kai-Heng Feng , Keith Busch , Robert Richter , Terry Bowman , Shiju Jose , Dave Jiang , linux-kernel@vger.kernel.org, linuxppc-dev@lists.ozlabs.org, Bjorn Helgaas Subject: Re: [PATCH v7 15/17] PCI/AER: Ratelimit correctable and non-fatal error logging Message-ID: <20250521230639.GA1452526@bhelgaas> X-Mailing-List: linuxppc-dev@lists.ozlabs.org List-Id: List-Help: List-Owner: List-Post: List-Archive: , List-Subscribe: , , List-Unsubscribe: Precedence: list MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: On Tue, May 20, 2025 at 03:33:45PM -0700, Sathyanarayanan Kuppuswamy wrote: > On 5/20/25 2:50 PM, Bjorn Helgaas wrote: > > From: Jon Pan-Doh > > > > Spammy devices can flood kernel logs with AER errors and slow/stall > > execution. Add per-device ratelimits for AER correctable and non-fatal > > uncorrectable errors that use the kernel defaults (10 per 5s). Logging of > > fatal errors is not ratelimited. > > + /* Ratelimits for errors */ > > + struct ratelimit_state cor_log_ratelimit; > > + struct ratelimit_state uncor_log_ratelimit; > > Nit: Do you think we should name it as nonfatal_log_ratelimit? Maybe so. We can always change this internal name, so I guess the important part is the sysfs filename ("/sys/bus/pci/devices//aer/ratelimit_burst_uncor_log"). "ratelimit_burst_nonfatal_log" is not quite parallel with "ratelimit_burst_cor_log" the way "ratelimit_burst_uncor_log" is. But it's definitely true that the underlying PCIe Messages are ERR_COR, ERR_NONFATAL, and ERR_FATAL. So I think this is more than a nit, and you're right that we should use "cor" and "nonfatal" somehow. I'll work on that tomorrow.