drm/amdkfd: multiple gpu migrate vram to vram
authorFelix Kuehling <Felix.Kuehling@amd.com>
Thu, 25 Feb 2021 04:57:33 +0000 (23:57 -0500)
committerAlex Deucher <alexander.deucher@amd.com>
Wed, 21 Apr 2021 01:50:22 +0000 (21:50 -0400)
commit1a3b2b5dca1924f2e7eae618ad79471c4a253236
treeb2f52298d725791f17ac7d881703e952f665ef21
parent564d2b92c7d4569cdc76a08fd700de1309faa5e8
drm/amdkfd: multiple gpu migrate vram to vram

If prefetch range to gpu with acutal location is another gpu, or GPU
retry fault restore pages to migrate the range with acutal location is
gpu, then migrate from one gpu to another gpu.

Use system memory as bridge because sdma engine may not able to access
another gpu vram, use sdma of source gpu to migrate to system memory,
then use sdma of destination gpu to migrate from system memory to gpu.

Print out gpuid or gpuidx in debug messages.

Signed-off-by: Philip Yang <Philip.Yang@amd.com>
Reviewed-by: Felix Kuehling <Felix.Kuehling@amd.com>
Signed-off-by: Felix Kuehling <Felix.Kuehling@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_migrate.h
drivers/gpu/drm/amd/amdkfd/kfd_svm.c