dma-debug: Make things less spammy under memory pressure
Subsystems (2)
PATCH 1/1 dma-debug: Make things less spammy under memory pressure
From: Rob Clark <[email protected]>
Ratelimit the error msg to avoid flooding the console.
--- kernel/dma/debug.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
kernel/dma/debug.c +1 -1
@@ -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,
Signature · 1 line
2.36.1
Robin Murphy
reviewerQuoted 14 lines · Rob Clark
From: Rob Clark <[email protected]>
Ratelimit the error msg to avoid flooding the console.
Signed-off-by Rob Clark <[email protected]>--- kernel/dma/debug.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)kernel/dma/debug.c +0
-0
kernel/dma/debug.c static void add_dma_entry(struct dma_debug_entry *entry, unsigned long attrs) · line 568
Quoted 6 lines
kernel/dma/debug.c +1
-1@@ -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;
Given that it's supposed to disable itself entirely if it ever gets here, just how spammy is it exactly?
Thanks,
Robin.
kernel/dma/debug.c static void add_dma_entry(struct dma_debug_entry *entry, unsigned long attrs) · line 570
Quoted 2 lines
kernel/dma/debug.c +0
-0}else if (rc == -EEXIST && !(attrs &DMA_ATTR_SKIP_CPU_SYNC )) { err_printk(entry->dev, entry,
_______________________________________________
iommu mailing list
[email protected]
https://lists.linuxfoundation.org/mailman/listinfo/iommu
Quoted 17 lines · Robin Murphy
Quoted 15 lines · Rob Clark
From: Rob Clark <[email protected]>
Ratelimit the error msg to avoid flooding the console.
Signed-off-by Rob Clark <[email protected]>--- kernel/dma/debug.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)kernel/dma/debug.c +0
-0@@ -564,7 +564,7 @@ static void add_dma_entry(struct dma_debug_entry *entry, unsigned long attrs)
Quoted 8 lines
kernel/dma/debug.c static void add_dma_entry(struct dma_debug_entry *entry, unsigned long attrs) · line 568
Quoted 5 lines
kernel/dma/debug.c +1
-1rc =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;Given that it's supposed to disable itself entirely if it ever gets here, just how spammy is it exactly?
um, quite.. tbf that was in the context of a WIP igt test for shrinker which was trying to cycle thru ~2x RAM size worth of GEM buffers on something like 72 threads. So it could just be threads that had gotten past the dma_debug_disabled() check already before global_disable was set to true?
I guess this could be pr_err_once() instead, then?
BR,
-R
Quoted 5 lines
Thanks,
Robin.Quoted 2 lines
kernel/dma/debug.c +0
-0}else if (rc == -EEXIST && !(attrs &DMA_ATTR_SKIP_CPU_SYNC )) { err_printk(entry->dev, entry,
Quoted 7 lines · Rob Clark
um, quite.. tbf that was in the context of a WIP igt test for shrinker which was trying to cycle thru ~2x RAM size worth of GEM buffers on something like 72 threads. So it could just be threads that had gotten past the
dma_debug_disabled()check already beforeglobal_disablewas set to true?I guess this could be
pr_err_once()instead, then?
Yes, we could use pr_err_once to reduce the chattyness while still keeping global_disable to disable all the actual tracking.