Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux
1
fork

Configure Feed

Select the types of activity you want to include in your feed.

drm/amdgpu: move GTT to shmem after eviction for hibernation

When hibernate with data center dGPUs, huge number of VRAM BOs evicted
to GTT and takes too much system memory. This will cause hibernation
fail due to insufficient memory for creating the hibernation image.

Move GTT BOs to shmem in KMD, then shmem to swap disk in kernel
hibernation code to make room for hibernation image.

Signed-off-by: Samuel Zhang <guoqing.zhang@amd.com>
Reviewed-by: Christian König <christian.koenig@amd.com>
Link: https://lore.kernel.org/r/20250710062313.3226149-3-guoqing.zhang@amd.com
Signed-off-by: Mario Limonciello <mario.limonciello@amd.com>

authored by

Samuel Zhang and committed by
Mario Limonciello
924dda02 40b6a946

+9 -1
+9 -1
drivers/gpu/drm/amd/amdgpu/amdgpu_device.c
··· 5029 5029 return 0; 5030 5030 5031 5031 ret = amdgpu_ttm_evict_resources(adev, TTM_PL_VRAM); 5032 - if (ret) 5032 + if (ret) { 5033 5033 dev_warn(adev->dev, "evicting device resources failed\n"); 5034 + return ret; 5035 + } 5036 + 5037 + if (adev->in_s4) { 5038 + ret = ttm_device_prepare_hibernation(&adev->mman.bdev); 5039 + if (ret) 5040 + dev_err(adev->dev, "prepare hibernation failed, %d\n", ret); 5041 + } 5034 5042 return ret; 5035 5043 } 5036 5044