Skip to content

Commit e19f8fa

Browse files
robclarkChristoph Hellwig
authored andcommitted
dma-debug: make things less spammy under memory pressure
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> Signed-off-by: Christoph Hellwig <hch@lst.de>
1 parent 4a37f3d commit e19f8fa

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

kernel/dma/debug.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -564,7 +564,7 @@ static void add_dma_entry(struct dma_debug_entry *entry, unsigned long attrs)
564564

565565
rc = active_cacheline_insert(entry);
566566
if (rc == -ENOMEM) {
567-
pr_err("cacheline tracking ENOMEM, dma-debug disabled\n");
567+
pr_err_once("cacheline tracking ENOMEM, dma-debug disabled\n");
568568
global_disable = true;
569569
} else if (rc == -EEXIST && !(attrs & DMA_ATTR_SKIP_CPU_SYNC)) {
570570
err_printk(entry->dev, entry,

0 commit comments

Comments
 (0)