drm/amdkfd: retry validation to recover range
GPU vm retry fault recover range need retry validation if 1. range is split in parallel by unmap while recover 2. range migrate to system memory and range is updated in system memory while recover 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>
This commit is contained in:
parent
c3c5cc9a83
commit
4999e398e2
|
@ -1402,11 +1402,13 @@ static int svm_range_validate_and_map(struct mm_struct *mm,
|
|||
svm_range_lock(prange);
|
||||
if (!prange->actual_loc) {
|
||||
if (amdgpu_hmm_range_get_pages_done(hmm_range)) {
|
||||
pr_debug("hmm update the range, need validate again\n");
|
||||
r = -EAGAIN;
|
||||
goto unlock_out;
|
||||
}
|
||||
}
|
||||
if (!list_empty(&prange->child_list)) {
|
||||
pr_debug("range split by unmap in parallel, validate again\n");
|
||||
r = -EAGAIN;
|
||||
goto unlock_out;
|
||||
}
|
||||
|
@ -2355,6 +2357,10 @@ out_unlock_svms:
|
|||
out:
|
||||
kfd_unref_process(p);
|
||||
|
||||
if (r == -EAGAIN) {
|
||||
pr_debug("recover vm fault later\n");
|
||||
r = 0;
|
||||
}
|
||||
return r;
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in New Issue