drm/amdgpu: Allocate coredump memory in a nonblocking way
authorAndré Almeida <andrealmeid@igalia.com>
Thu, 17 Aug 2023 18:20:46 +0000 (15:20 -0300)
committerAlex Deucher <alexander.deucher@amd.com>
Wed, 30 Aug 2023 19:51:16 +0000 (15:51 -0400)
During a GPU reset, a normal memory reclaim could block to reclaim
memory. Giving that coredump is a best effort mechanism, it shouldn't
disturb the reset path. Change its memory allocation flag to a
nonblocking one.

Signed-off-by: André Almeida <andrealmeid@igalia.com>
Reviewed-by: Christian König <christian.koenig@amd.com>
Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
drivers/gpu/drm/amd/amdgpu/amdgpu_device.c

index b2bc5eb31a90b4922418838b7cfd429c1fa57e3a..603ce113a9f8aaba2c316cd889b63977bc9d3fd1 100644 (file)
@@ -4870,7 +4870,7 @@ static void amdgpu_reset_capture_coredumpm(struct amdgpu_device *adev)
        struct drm_device *dev = adev_to_drm(adev);
 
        ktime_get_ts64(&adev->reset_time);
-       dev_coredumpm(dev->dev, THIS_MODULE, adev, 0, GFP_KERNEL,
+       dev_coredumpm(dev->dev, THIS_MODULE, adev, 0, GFP_NOWAIT,
                      amdgpu_devcoredump_read, amdgpu_devcoredump_free);
 }
 #endif