Commit a3ecd97a authored by Lucas Stach's avatar Lucas Stach

drm/etnaviv: switch devcoredump allocations to GFP_NOWAIT

The etnaviv devcoredump is created in the GPU reset path, which
must make forward progress to avoid stalling memory reclaim on
unsignalled dma fences. The currently used __GFP_NORETRY does not
prohibit sleeping on direct reclaim, breaking the forward progress
guarantee. Switch to GFP_NOWAIT, which allows background reclaim
to be triggered, but avoids any stalls waiting for direct reclaim.
Signed-off-by: default avatarLucas Stach <l.stach@pengutronix.de>
Reviewed-by: default avatarDaniel Vetter <daniel.vetter@ffwll.ch>
parent a233df7f
...@@ -159,8 +159,7 @@ void etnaviv_core_dump(struct etnaviv_gem_submit *submit) ...@@ -159,8 +159,7 @@ void etnaviv_core_dump(struct etnaviv_gem_submit *submit)
file_size += sizeof(*iter.hdr) * n_obj; file_size += sizeof(*iter.hdr) * n_obj;
/* Allocate the file in vmalloc memory, it's likely to be big */ /* Allocate the file in vmalloc memory, it's likely to be big */
iter.start = __vmalloc(file_size, GFP_KERNEL | __GFP_NOWARN | iter.start = __vmalloc(file_size, GFP_NOWAIT);
__GFP_NORETRY);
if (!iter.start) { if (!iter.start) {
mutex_unlock(&submit->mmu_context->lock); mutex_unlock(&submit->mmu_context->lock);
dev_warn(gpu->dev, "failed to allocate devcoredump file\n"); dev_warn(gpu->dev, "failed to allocate devcoredump file\n");
...@@ -230,5 +229,5 @@ void etnaviv_core_dump(struct etnaviv_gem_submit *submit) ...@@ -230,5 +229,5 @@ void etnaviv_core_dump(struct etnaviv_gem_submit *submit)
etnaviv_core_dump_header(&iter, ETDUMP_BUF_END, iter.data); etnaviv_core_dump_header(&iter, ETDUMP_BUF_END, iter.data);
dev_coredumpv(gpu->dev, iter.start, iter.data - iter.start, GFP_KERNEL); dev_coredumpv(gpu->dev, iter.start, iter.data - iter.start, GFP_NOWAIT);
} }
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment