]> git.baikalelectronics.ru Git - kernel.git/commit
drm/amdkfd: Remove prefault before migrating to VRAM
authorPhilip Yang <Philip.Yang@amd.com>
Tue, 26 Jul 2022 19:13:30 +0000 (15:13 -0400)
committerAlex Deucher <alexander.deucher@amd.com>
Tue, 13 Sep 2022 16:54:23 +0000 (12:54 -0400)
commit2d775d4d4d1a8a3bbffd3ac6dd09be50ca9fb480
tree91985e7bd6a9a223fa924488837281c5204187d8
parentf2cb79cf29051eff80169a51afaeb8e1b5805f69
drm/amdkfd: Remove prefault before migrating to VRAM

Prefaulting potentially allocates system memory pages before a
migration. This adds unnecessary overhead. Instead we can skip
unallocated pages in the migration and just point migrate->dst to a
0-initialized VRAM page directly. Then the VRAM page will be inserted
to the PTE. A subsequent CPU page fault will migrate the page back to
system memory.

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