Patch "drm/amdkfd: retry after EBUSY is returned from hmm_ranges_get_pages" has been added to the 6.5-stable tree

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



This is a note to let you know that I've just added the patch titled

    drm/amdkfd: retry after EBUSY is returned from hmm_ranges_get_pages

to the 6.5-stable tree which can be found at:
    http://www.kernel.org/git/?p=linux/kernel/git/stable/stable-queue.git;a=summary

The filename of the patch is:
     drm-amdkfd-retry-after-ebusy-is-returned-from-hmm_ra.patch
and it can be found in the queue-6.5 subdirectory.

If you, or anyone else, feels it should not be added to the stable tree,
please let <stable@xxxxxxxxxxxxxxx> know about it.



commit 183cf99a29cb83ef40a35821dc4f08ed1f32864e
Author: Alex Sierra <alex.sierra@xxxxxxx>
Date:   Tue Aug 15 15:42:52 2023 -0500

    drm/amdkfd: retry after EBUSY is returned from hmm_ranges_get_pages
    
    [ Upstream commit ebac9414a56a5f7c336db5f5c7cc34713b649407 ]
    
    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@xxxxxxx>
    Reviewed-by: Felix Kuehling <Felix.Kuehling@xxxxxxx>
    Signed-off-by: Alex Deucher <alexander.deucher@xxxxxxx>
    Stable-dep-of: eb3c357bcb28 ("drm/amdkfd: Handle errors from svm validate and map")
    Signed-off-by: Sasha Levin <sashal@xxxxxxxxxx>

diff --git a/drivers/gpu/drm/amd/amdkfd/kfd_svm.c b/drivers/gpu/drm/amd/amdkfd/kfd_svm.c
index a9b57c66cb7d7..4c1b72194a6f8 100644
--- a/drivers/gpu/drm/amd/amdkfd/kfd_svm.c
+++ b/drivers/gpu/drm/amd/amdkfd/kfd_svm.c
@@ -1651,6 +1651,8 @@ static int svm_range_validate_and_map(struct mm_struct *mm,
 		WRITE_ONCE(p->svms.faulting_task, NULL);
 		if (r) {
 			pr_debug("failed %d to get svm range pages\n", r);
+			if (r == -EBUSY)
+				r = -EAGAIN;
 			goto unreserve_out;
 		}
 



[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Index of Archives]     [Linux USB Devel]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]

  Powered by Linux