drm/amdkfd: Handle incomplete migration to system memory
authorFelix Kuehling <Felix.Kuehling@amd.com>
Wed, 27 Oct 2021 23:24:46 +0000 (19:24 -0400)
committerAlex Deucher <alexander.deucher@amd.com>
Wed, 3 Nov 2021 16:22:07 +0000 (12:22 -0400)
commit740a451b0797bf91cd6adb1b6e86d4422e37a34a
tree149a22b40bfe3a2f0b1df175d34a74e51540ea07
parent12fcf0a7dacca7d84b100bd34a7b8bb1f3198552
drm/amdkfd: Handle incomplete migration to system memory

If some pages fail to migrate to system memory, don't update
prange->actual_loc = 0. This prevents endless CPU page faults after
partial migration failures due to contested page locks.

Migration to RAM must be complete during migrations from VRAM to VRAM and
during evictions. Implement retry and fail if the migration to RAM fails.

Signed-off-by: Felix Kuehling <Felix.Kuehling@amd.com>
Reviewed-by: Philip Yang <Philip.Yang@amd.com>
Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
drivers/gpu/drm/amd/amdkfd/kfd_migrate.c
drivers/gpu/drm/amd/amdkfd/kfd_svm.c