]> 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)
commitcfa27a09a4d155c092c6d6efdc3e8544f03bace9
treed1f89b647efac0a9638ddeec7f9403bd4e2fc417
parent0e04bff402918a9cb07ce06b6ed0fd71f36ad887
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