diff options
author | Lang Yu <Lang.Yu@amd.com> | 2022-04-15 15:35:44 +0800 |
---|---|---|
committer | Ma Jun <Jun.Ma2@amd.com> | 2022-04-18 21:07:03 +0800 |
commit | c9030b60b479d21e6c7fe41f1f5325c4b6ecafc2 (patch) | |
tree | 704526a18bacfde63f36cced16056f8c9f386cb3 | |
parent | b9c0a0eccef874248870058a31f4d03751e57192 (diff) |
drm/amdkfd: only allow heavy-weight TLB flush on some ASICs for SVM too
The idea is from commit a50fe7078035 ("drm/amdkfd: Only apply heavy-weight
TLB flush on Aldebaran") and commit f61c40c0757a ("drm/amdkfd: enable
heavy-weight TLB flush on Arcturus").
At the moment, heavy-weight TLB could cause problems on ASICs except
Aldebaran and Arcturus.
A simple hipMallocManaged/hipFree program could trigger this issue.
[ 97.787657] amdgpu 0000:01:00.0: amdgpu: wait for kiq fence error: 0.
[ 106.868758] amdgpu: qcm fence wait loop timeout expired
[ 106.868966] amdgpu: The cp might be in an unrecoverable state due to an unsuccessful queues preemption
[ 106.869203] amdgpu: Failed to evict process queues
[ 106.869261] amdgpu: Failed to quiesce KFD
Signed-off-by: Lang Yu <Lang.Yu@amd.com>
Reviewed-by: Felix Kuehling <Felix.Kuehling@amd.com>
-rw-r--r-- | drivers/gpu/drm/amd/amdkfd/kfd_svm.c | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/drivers/gpu/drm/amd/amdkfd/kfd_svm.c b/drivers/gpu/drm/amd/amdkfd/kfd_svm.c index 6aca40ebd053..8a3d51a8fcf2 100644 --- a/drivers/gpu/drm/amd/amdkfd/kfd_svm.c +++ b/drivers/gpu/drm/amd/amdkfd/kfd_svm.c @@ -1234,7 +1234,9 @@ svm_range_unmap_from_gpus(struct svm_range *prange, unsigned long start, if (r) break; } - kfd_flush_tlb(pdd, TLB_FLUSH_HEAVYWEIGHT); + + if (kfd_flush_tlb_after_unmap(pdd->dev)) + kfd_flush_tlb(pdd, TLB_FLUSH_HEAVYWEIGHT); } return r; |