Skip to content

Commit 84bc4f1

Browse files
Mikulas PatockaChristoph Hellwig
authored andcommitted
dma-debug: change allocation mode from GFP_NOWAIT to GFP_ATIOMIC
We observed the error "cacheline tracking ENOMEM, dma-debug disabled" during a light system load (copying some files). The reason for this error is that the dma_active_cacheline radix tree uses GFP_NOWAIT allocation - so it can't access the emergency memory reserves and it fails as soon as anybody reaches the watermark. This patch changes GFP_NOWAIT to GFP_ATOMIC, so that it can access the emergency memory reserves. Signed-off-by: Mikulas Patocka <[email protected]> Signed-off-by: Christoph Hellwig <[email protected]>
1 parent 92826e9 commit 84bc4f1

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
@@ -448,7 +448,7 @@ void debug_dma_dump_mappings(struct device *dev)
448448
* other hand, consumes a single dma_debug_entry, but inserts 'nents'
449449
* entries into the tree.
450450
*/
451-
static RADIX_TREE(dma_active_cacheline, GFP_NOWAIT);
451+
static RADIX_TREE(dma_active_cacheline, GFP_ATOMIC);
452452
static DEFINE_SPINLOCK(radix_lock);
453453
#define ACTIVE_CACHELINE_MAX_OVERLAP ((1 << RADIX_TREE_MAX_TAGS) - 1)
454454
#define CACHELINE_PER_PAGE_SHIFT (PAGE_SHIFT - L1_CACHE_SHIFT)

0 commit comments

Comments
 (0)