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 56A31C3ABDD for ; Tue, 20 May 2025 18:32:00 +0000 (UTC) Received: from boromir.ozlabs.org (localhost [127.0.0.1]) by lists.ozlabs.org (Postfix) with ESMTP id 4b23725bJ1z3bW7; Wed, 21 May 2025 04:31:58 +1000 (AEST) Authentication-Results: lists.ozlabs.org; arc=none smtp.remote-ip=139.178.84.217 ARC-Seal: i=1; a=rsa-sha256; d=lists.ozlabs.org; s=201707; t=1747765918; cv=none; b=ZNMsw7XbQVhrmrCObFB1vacDKr73Ptee6Y8k1BMjK/fqVRO9qEdAUFVQsCfoTBvnuJLqnkUFxokbOf8MBIdIuaRSmk72mA8NuGkgdjiLVJrN01jORkc/tLwxQo9OVOJIJHwZStoWbEfgaKofbeFdXBw/ovx+QL63iQdUvBJ9xbMYvvdPUmWDmJo0vN37L/Hp8wsIJH0xBH82XpGqp/kWle0rbrNMGZm+HuBF9gQT2HgqUYtAW9T4RyptbejGcp4PUr6U9Y4YwSA+Hdqfbs6L0awZSGdLUzlbF1P7adaVIEH6rb7OR5b0vja4Z0Cs36FDxjiuOGgXTQjjNFFcTyIrQA== ARC-Message-Signature: i=1; a=rsa-sha256; d=lists.ozlabs.org; s=201707; t=1747765918; c=relaxed/relaxed; bh=B+C8gJOMI9UdPFQs/RDaOgTyEoHMCEvKIqNexg7CDYk=; h=Date:From:To:Cc:Subject:Message-ID:MIME-Version:Content-Type: Content-Disposition:In-Reply-To; b=MwKAT8r1mpcGz4/qZHKKlqIkQOT6WsGEehC1Uk8Hzd49afB3WGR8LX49gmb1/1wPSCHjpqLAcsHn6hC0b31tgO0hECVEjDB/2wLpdALU2gbi6+HcqMTBpgiarqE7s0uu91uBhkjLMrQI12eqQIAnhNJsaCafaySs9OfpnzVagFqiCJjzng7ZRnZjaf+jwn4o57aoIFdh4VgdWVp19ZgMHXcjLNV8UnqZFujLdgA6kPOegkeYe7/7DdqXtRuemWwfPvKu8Ol6e8xGO9vyAYe1KS+TKdEntsw7rhdRtc+0/geuyARrxzGI/k0HrEZbPCYlNitDdu/g/vAx2PnuIxsJrA== 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=hddkKu0m; dkim-atps=neutral; spf=pass (client-ip=139.178.84.217; helo=dfw.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=hddkKu0m; dkim-atps=neutral Authentication-Results: lists.ozlabs.org; spf=pass (sender SPF authorized) smtp.mailfrom=kernel.org (client-ip=139.178.84.217; helo=dfw.source.kernel.org; envelope-from=helgaas@kernel.org; receiver=lists.ozlabs.org) Received: from dfw.source.kernel.org (dfw.source.kernel.org [139.178.84.217]) (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 4b23720rcRz2yr1 for ; Wed, 21 May 2025 04:31:58 +1000 (AEST) Received: from smtp.kernel.org (transwarp.subspace.kernel.org [100.75.92.58]) by dfw.source.kernel.org (Postfix) with ESMTP id 5E9E75C5422; Tue, 20 May 2025 18:29:38 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id A596FC4CEE9; Tue, 20 May 2025 18:31:54 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1747765914; bh=jwee9jRHKC9i3IB6hd0Exj0Pc2dnDouthrKRY1Giwiw=; h=Date:From:To:Cc:Subject:In-Reply-To:From; b=hddkKu0mDChvBNXjmgLXbi56ACoBmD+CiBVK+DuLbZbm0ooahVgLKKbbVFt+bm3Gj ds7VCAhwsNKpDFVHR+pZDqeUeC8pAYjz+A/lZEdzJICnvU9ceiLRIJq96tkIgOp+no Dq7HcJeYijENpOEsRApyEcxf22JVb1NAYoMye7ClehwZ4godbkhHh1r9/gqiKyJ3hi w7BZXh8iCo6QLspaEWrkoPgrsJda8ViQrnv8In0hQEYhN/A+FXEnaXEA3N3yYUpeAI uz28tTNzk1ZrkL9Y1XXeDZaqwuqbPSun21G5eHxCM0i9hu8MVVNKigUMu4GUbz+Xev FK8LNbMGdjb5w== Date: Tue, 20 May 2025 13:31:53 -0500 From: Bjorn Helgaas To: Sathyanarayanan Kuppuswamy Cc: linux-pci@vger.kernel.org, Jon Pan-Doh , Karolina Stolarek , 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 v6 14/16] PCI/AER: Introduce ratelimit for error logs Message-ID: <20250520183153.GA1316070@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 Mon, May 19, 2025 at 09:59:29PM -0700, Sathyanarayanan Kuppuswamy wrote: > On 5/19/25 2:35 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 uncorrectable > > errors that use the kernel defaults (10 per 5s). > > > > There are two AER logging entry points: > > > > - aer_print_error() is used by DPC and native AER > > > > - pci_print_aer() is used by GHES and CXL > > > > The native AER aer_print_error() case includes a loop that may log details > > from multiple devices. This is ratelimited by the union of ratelimits for > > these devices, set by add_error_device(), which collects the devices. If > > no such device is found, the Error Source message is ratelimited by the > > Root Port or RCEC that received the ERR_* message. > > > > The DPC aer_print_error() case is currently not ratelimited. > > Can we also not rate limit fatal errors in AER driver? In other words, only rate limit AER_CORRECTABLE and AER_NONFATAL for AER? Seems plausible to me.