From: Philip Yang <Philip.Yang@amd.com>
To: amd-gfx@lists.freedesktop.org
Cc: Philip Yang <Philip.Yang@amd.com>
Subject: [PATCH 1/6] drm/amdkfd: retry validation to recover range
Date: Tue, 20 Apr 2021 16:21:18 -0400 [thread overview]
Message-ID: <20210420202122.4701-1-Philip.Yang@amd.com> (raw)
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>
---
drivers/gpu/drm/amd/amdkfd/kfd_svm.c | 6 ++++++
1 file changed, 6 insertions(+)
diff --git a/drivers/gpu/drm/amd/amdkfd/kfd_svm.c b/drivers/gpu/drm/amd/amdkfd/kfd_svm.c
index 0e0b4ffd20ab..40ef5709d0a7 100644
--- a/drivers/gpu/drm/amd/amdkfd/kfd_svm.c
+++ b/drivers/gpu/drm/amd/amdkfd/kfd_svm.c
@@ -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;
}
@@ -2254,6 +2256,10 @@ svm_range_restore_pages(struct amdgpu_device *adev, unsigned int pasid,
out:
kfd_unref_process(p);
+ if (r == -EAGAIN) {
+ pr_debug("recover vm fault later\n");
+ r = 0;
+ }
return r;
}
--
2.17.1
_______________________________________________
amd-gfx mailing list
amd-gfx@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/amd-gfx
next reply other threads:[~2021-04-20 20:21 UTC|newest]
Thread overview: 13+ messages / expand[flat|nested] mbox.gz Atom feed top
2021-04-20 20:21 Philip Yang [this message]
2021-04-20 20:21 ` [PATCH 2/6] drm/amdgpu: return IH ring drain finished if ring is empty Philip Yang
2021-04-20 20:21 ` [PATCH 3/6] drm/amdkfd: handle stale retry fault Philip Yang
2021-04-20 20:21 ` [PATCH 4/6] drm/amdgpu: address remove from fault filter Philip Yang
2021-04-21 1:20 ` Felix Kuehling
2021-04-21 7:55 ` Christian König
2021-04-21 15:29 ` Felix Kuehling
2021-04-23 1:52 ` philip yang
2021-04-21 7:22 ` Christian König
2021-04-23 2:00 ` philip yang
2021-04-20 20:21 ` [PATCH 5/6] drm/amdkfd: enable subsequent retry fault Philip Yang
2021-04-21 1:22 ` Felix Kuehling
2021-04-21 2:08 ` philip yang
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20210420202122.4701-1-Philip.Yang@amd.com \
--to=philip.yang@amd.com \
--cc=amd-gfx@lists.freedesktop.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.