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 vger.kernel.org (vger.kernel.org [23.128.96.18]) by smtp.lore.kernel.org (Postfix) with ESMTP id 99517C433EF for ; Tue, 14 Jun 2022 02:22:07 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1354205AbiFNCWG (ORCPT ); Mon, 13 Jun 2022 22:22:06 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:57144 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1354864AbiFNCPK (ORCPT ); Mon, 13 Jun 2022 22:15:10 -0400 Received: from dfw.source.kernel.org (dfw.source.kernel.org [139.178.84.217]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id BFEA53CFEC; Mon, 13 Jun 2022 19:09:07 -0700 (PDT) Received: from smtp.kernel.org (relay.kernel.org [52.25.139.140]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by dfw.source.kernel.org (Postfix) with ESMTPS id 61CDD60AD8; Tue, 14 Jun 2022 02:09:07 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id 31A7BC34114; Tue, 14 Jun 2022 02:09:06 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1655172546; bh=Dp+X6o7JGXE3l8yXNOOVGEEyGNzj/eM27todlgKYe/A=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=J1xz12UZtO2vVC3awubzS0Fgmo/+fs2+M6VLouAfSa2tGHKxpmxF69S7ATEI17Xkl CmyPUhYfdYarDdtq3oaj5Ov1aXN4dJ77+zAaJ+8gBQCriTP5Hm65TG4jMGaZn3Hgri n3pJUqEVnktEdtnhT46cwHTk0ALOMXGQQc6dmG4RPXJerRk0k8fFf8KwS64vkBdSP6 BZV5+aYaj17s2UR+BV45qVo0IgBOZCZ/0D31Kv9WI0e6qzw8VixrhYcxuJ3sDhTmbg /xC/rrCUhejpVOmxkaIb99MMztIXB2ejBOO4ZitIQOJWPf2F1A368lIsshnrG+/8Vt IdZyW5Ao0mFfQ== From: Sasha Levin To: linux-kernel@vger.kernel.org, stable@vger.kernel.org Cc: Rob Clark , Christoph Hellwig , Sasha Levin Subject: [PATCH AUTOSEL 5.4 03/23] dma-debug: make things less spammy under memory pressure Date: Mon, 13 Jun 2022 22:08:39 -0400 Message-Id: <20220614020900.1100401-3-sashal@kernel.org> X-Mailer: git-send-email 2.35.1 In-Reply-To: <20220614020900.1100401-1-sashal@kernel.org> References: <20220614020900.1100401-1-sashal@kernel.org> MIME-Version: 1.0 X-stable: review X-Patchwork-Hint: Ignore Content-Transfer-Encoding: 8bit Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org From: Rob Clark [ Upstream commit e19f8fa6ce1ca9b8b934ba7d2e8f34c95abc6e60 ] Limit the error msg to avoid flooding the console. If you have a lot of threads hitting this at once, they could have already gotten passed the dma_debug_disabled() check before they get to the point of allocation failure, resulting in quite a lot of this error message spamming the log. Use pr_err_once() to limit that. Signed-off-by: Rob Clark Signed-off-by: Christoph Hellwig Signed-off-by: Sasha Levin --- kernel/dma/debug.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/kernel/dma/debug.c b/kernel/dma/debug.c index 4dc3bbfd3e3f..e1a7d55ee33a 100644 --- a/kernel/dma/debug.c +++ b/kernel/dma/debug.c @@ -616,7 +616,7 @@ static void add_dma_entry(struct dma_debug_entry *entry) rc = active_cacheline_insert(entry); if (rc == -ENOMEM) { - pr_err("cacheline tracking ENOMEM, dma-debug disabled\n"); + pr_err_once("cacheline tracking ENOMEM, dma-debug disabled\n"); global_disable = true; } -- 2.35.1