dma-debug: change allocation mode from GFP_NOWAIT to GFP_ATIOMIC
authorMikulas Patocka <mpatocka@redhat.com>
Tue, 10 May 2022 17:17:32 +0000 (13:17 -0400)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Thu, 9 Jun 2022 08:22:37 +0000 (10:22 +0200)
commite202dad51908c942b307374cfc967800993afc78
treecc3c19ff2bb627ade3639df414d54fe3583b1241
parentbab45966325003e92b8ebbc3a9cada1c7141df93
dma-debug: change allocation mode from GFP_NOWAIT to GFP_ATIOMIC

[ Upstream commit 84bc4f1dbbbb5f8aa68706a96711dccb28b518e5 ]

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 <mpatocka@redhat.com>
Signed-off-by: Christoph Hellwig <hch@lst.de>
Signed-off-by: Sasha Levin <sashal@kernel.org>
kernel/dma/debug.c