From patchwork Tue May 31 21:51:06 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Rob Clark X-Patchwork-Id: 577888 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 E0788C433F5 for ; Tue, 31 May 2022 21:51:13 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1348147AbiEaVvL (ORCPT ); Tue, 31 May 2022 17:51:11 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:33232 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1348142AbiEaVvL (ORCPT ); Tue, 31 May 2022 17:51:11 -0400 Received: from mail-pf1-x42f.google.com (mail-pf1-x42f.google.com [IPv6:2607:f8b0:4864:20::42f]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 729868D69D; Tue, 31 May 2022 14:51:10 -0700 (PDT) Received: by mail-pf1-x42f.google.com with SMTP id b135so111398pfb.12; Tue, 31 May 2022 14:51:10 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20210112; h=from:to:cc:subject:date:message-id:mime-version :content-transfer-encoding; bh=B9FwC67kdV1Qhd0VfAGvYEKiy1HjaP02OHwCopLdlrk=; b=UXkot/AAjsbfd2YxXonkpfjWoJWPHa9e2I3jq/G3iGrnZnG4gcDZrF9eCcyJrwi+Ad P8P60say7nteVz4Lu0KbuwtEHmo/B1bGiu2/yNBW+hwKK1Mrf0sth2PeBJDlfPO4hcEk kwWqmV2l+RPk30kJc1tI1HefHk1Mb3QPCw4ZkaEqZQ0pBbp6kDtkgDEAt+bcMv9did6b uVAYVi3DY1mzl4BNAJHqqvx2ZSRGRyBwQ31eiX3yxaNWrJkcZxYfhwILXw4gl+7zF8PF 8Ml5qqbrxWltikDVQHCPf/+dNc6Zvb9PFJvKLQK4sI7alUJ7boSKgJHxzl2SdzIhRH5V HswA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=x-gm-message-state:from:to:cc:subject:date:message-id:mime-version :content-transfer-encoding; bh=B9FwC67kdV1Qhd0VfAGvYEKiy1HjaP02OHwCopLdlrk=; b=VFW5XDgka3dnHtq1uZ7AHPCga4RXE82N/iOC4DngfJreMV5udvLcq0w5sL+VnNeR9L 2maV2belpllKrJcpzOMCewTiuPVisVWNMTwfbap5rRWUyZYvx/r8hFc8Xetuj+/WTj25 tADFJ3OSQhnClH5XN9XgVsmbeL6Q0GUdKLLlrbo24bn1ZQvk6Nkzs5Unkv9ZVgoRK2+l yUO3Ra63ZBdS10mor2lFWx7In+/zhARfcx/0WCbKXORYvshckUG1MKEQTsWQ+rmij5kW HStNYunmCijm2m+N6t+xMOpincopVLdasMEHHTvkyoSUJj55S1RpU42krCkTzGJRctVc qRWA== X-Gm-Message-State: AOAM5338MBW68waRvlE9ytoXYl5vI+kx/6v2F3BLS6dJtZOATANCiQiS UnObFACVzV26JddXl5odSBwbNOLGdJs= X-Google-Smtp-Source: ABdhPJyuMvsm/NRmorMJqRxBRNiHArx79tqFW/gO7U6IBR7sfrrK6kJgo4/ofqYcX4K4Iuzd3he0Lg== X-Received: by 2002:a62:d45e:0:b0:51b:4d60:cda4 with SMTP id u30-20020a62d45e000000b0051b4d60cda4mr11758399pfl.17.1654033869377; Tue, 31 May 2022 14:51:09 -0700 (PDT) Received: from localhost ([2a00:79e1:abd:4a00:2703:3c72:eb1a:cffd]) by smtp.gmail.com with ESMTPSA id w8-20020a1709026f0800b001640a74624dsm36981plk.24.2022.05.31.14.51.07 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 31 May 2022 14:51:08 -0700 (PDT) From: Rob Clark To: linux-kernel@vger.kernel.org Cc: linux-arm-msm@vger.kernel.org, Rob Clark , Christoph Hellwig , Marek Szyprowski , Robin Murphy , iommu@lists.linux-foundation.org (open list:DMA MAPPING HELPERS) Subject: [PATCH] dma-debug: Make things less spammy under memory pressure Date: Tue, 31 May 2022 14:51:06 -0700 Message-Id: <20220531215106.192271-1-robdclark@gmail.com> X-Mailer: git-send-email 2.36.1 MIME-Version: 1.0 Precedence: bulk List-ID: X-Mailing-List: linux-arm-msm@vger.kernel.org From: Rob Clark Ratelimit the error msg to avoid flooding the console. Signed-off-by: Rob Clark --- 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 f8ff598596b8..683966f0247b 100644 --- a/kernel/dma/debug.c +++ b/kernel/dma/debug.c @@ -564,7 +564,7 @@ static void add_dma_entry(struct dma_debug_entry *entry, unsigned long attrs) rc = active_cacheline_insert(entry); if (rc == -ENOMEM) { - pr_err("cacheline tracking ENOMEM, dma-debug disabled\n"); + pr_err_ratelimited("cacheline tracking ENOMEM, dma-debug disabled\n"); global_disable = true; } else if (rc == -EEXIST && !(attrs & DMA_ATTR_SKIP_CPU_SYNC)) { err_printk(entry->dev, entry,