Skip to content

Commit 3aca8cc

Browse files
alexsierragalexdeucher
authored andcommitted
drm/amdkfd: retry after EBUSY is returned from hmm_ranges_get_pages
if hmm_range_get_pages returns EBUSY error during svm_range_validate_and_map, within the context of a page fault interrupt. This should retry through svm_range_restore_pages callback. Therefore we treat this as EAGAIN error instead, and defer it to restore pages fallback. Signed-off-by: Alex Sierra <alex.sierra@amd.com> Reviewed-by: Felix Kuehling <Felix.Kuehling@amd.com> Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
1 parent bae44a8 commit 3aca8cc

1 file changed

Lines changed: 2 additions & 0 deletions

File tree

drivers/gpu/drm/amd/amdkfd/kfd_svm.c

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1686,6 +1686,8 @@ static int svm_range_validate_and_map(struct mm_struct *mm,
16861686
WRITE_ONCE(p->svms.faulting_task, NULL);
16871687
if (r) {
16881688
pr_debug("failed %d to get svm range pages\n", r);
1689+
if (r == -EBUSY)
1690+
r = -EAGAIN;
16891691
goto unreserve_out;
16901692
}
16911693

0 commit comments

Comments
 (0)