]> git.baikalelectronics.ru Git - kernel.git/commit
drm/amdkfd: Add SVM range mapped_to_gpu flag
authorPhilip Yang <Philip.Yang@amd.com>
Tue, 19 Apr 2022 01:32:14 +0000 (21:32 -0400)
committerAlex Deucher <alexander.deucher@amd.com>
Tue, 26 Apr 2022 15:42:44 +0000 (11:42 -0400)
commit1c9bd5273c9ea1d50729e321a45bfe364097dd30
treed1f89b647efac0a9638ddeec7f9403bd4e2fc417
parent7c7703102353a79125ee1024f1bfb91b27052e4b
drm/amdkfd: Add SVM range mapped_to_gpu flag

To avoid unnecessary unmap SVM range from GPUs if range is not mapped on
GPUs when migrating the range. This flag will also be used to flush TLB
when updating the existing mapping on GPUs.

It is protected by prange->migrate_mutex and mmap read lock in MMU
notifier callback.

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_svm.c
drivers/gpu/drm/amd/amdkfd/kfd_svm.h