]> git.baikalelectronics.ru Git - kernel.git/commit
drm/amdkfd: support concurrent userptr update for HMM
authorPhilip Yang <Philip.Yang@amd.com>
Mon, 4 Mar 2019 19:10:12 +0000 (14:10 -0500)
committerAlex Deucher <alexander.deucher@amd.com>
Fri, 24 May 2019 17:21:02 +0000 (12:21 -0500)
commitdfef0ed67bfcfe14ff821fc41f0e1db515a8d6ec
tree88b6b7fe05fda43bda556e7d75db09517ccc1247
parenta2cba96fff6e87053bbf711dd424c030e1f219c4
drm/amdkfd: support concurrent userptr update for HMM

Userptr restore may have concurrent userptr invalidation after
hmm_vma_fault adds the range to the hmm->ranges list, needs call
hmm_vma_range_done to remove the range from hmm->ranges list first,
then reschedule the restore worker. Otherwise hmm_vma_fault will add
same range to the list, this will cause loop in the list because
range->next point to range itself.

Add function untrack_invalid_user_pages to reduce code duplication.

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/amdgpu/amdgpu_amdkfd_gpuvm.c