* [PATCH v2] dma-debug: Make things less spammy under memory pressure
@ 2022-06-01 14:51 Rob Clark
0 siblings, 0 replies; only message in thread
From: Rob Clark @ 2022-06-01 14:51 UTC (permalink / raw)
To: linux-kernel
Cc: linux-arm-kernel, Christoph Hellwig, Robin Murphy, Rob Clark,
Marek Szyprowski, open list:DMA MAPPING HELPERS
From: Rob Clark <robdclark@chromium.org>
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 <robdclark@chromium.org>
---
v2: Use pr_err_once() instead of ratelimited, and spiff out commit msg a bit.
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..754e3456f017 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_once("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,
--
2.36.1
^ permalink raw reply related [flat|nested] only message in thread
only message in thread, other threads:[~2022-06-01 14:51 UTC | newest]
Thread overview: (only message) (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2022-06-01 14:51 [PATCH v2] dma-debug: Make things less spammy under memory pressure Rob Clark
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox