<html><head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
</head>
<body>
<p><br>
</p>
<div class="moz-cite-prefix">On 2021-05-10 8:56 a.m., Felix Kuehling
wrote:<br>
</div>
<blockquote type="cite" cite="mid:21e77c32-4299-2923-e43c-821fe996defe@amd.com">
<pre class="moz-quote-pre" wrap="">Am 2021-05-07 um 3:07 p.m. schrieb Philip Yang:
</pre>
<blockquote type="cite">
<pre class="moz-quote-pre" wrap="">New range is created to recover retry vm fault, set all GPUs have access
to the range. The new range preferred_loc is default value
KFD_IOCTL_SVM_LOCATION_UNDEFINED.
Correct one typo.
Signed-off-by: Philip Yang <a class="moz-txt-link-rfc2396E" href="mailto:Philip.Yang@amd.com"><Philip.Yang@amd.com></a>
</pre>
</blockquote>
<pre class="moz-quote-pre" wrap="">
Would it be better to move this into svm_range_new, conditional on
p->xnack_enabled? That way it would correctly apply to ranges created
through SVM API calls (e.g. in svm_range_handle_overlap or
svm_range_add) as well?
</pre>
</blockquote>
<p>Yes, this is good idea, patch 1/2 is not needed with this change.<br>
</p>
<p>Philip<br>
</p>
<blockquote type="cite" cite="mid:21e77c32-4299-2923-e43c-821fe996defe@amd.com">
<pre class="moz-quote-pre" wrap="">
Regards,
Felix
</pre>
<blockquote type="cite">
<pre class="moz-quote-pre" wrap="">---
drivers/gpu/drm/amd/amdkfd/kfd_svm.c | 7 +++----
1 file changed, 3 insertions(+), 4 deletions(-)
diff --git a/drivers/gpu/drm/amd/amdkfd/kfd_svm.c b/drivers/gpu/drm/amd/amdkfd/kfd_svm.c
index d9111fea724b..537b12e75f54 100644
--- a/drivers/gpu/drm/amd/amdkfd/kfd_svm.c
+++ b/drivers/gpu/drm/amd/amdkfd/kfd_svm.c
@@ -2243,7 +2243,7 @@ svm_range *svm_range_create_unregistered_range(struct amdgpu_device *adev,
prange = svm_range_new(&p->svms, start, last);
if (!prange) {
- pr_debug("Failed to create prange in address [0x%llx]\\n", addr);
+ pr_debug("Failed to create prange in address [0x%llx]\n", addr);
return NULL;
}
if (kfd_process_gpuid_from_kgd(p, adev, &gpuid, &gpuidx)) {
@@ -2251,9 +2251,8 @@ svm_range *svm_range_create_unregistered_range(struct amdgpu_device *adev,
svm_range_free(prange);
return NULL;
}
- prange->preferred_loc = gpuid;
- prange->actual_loc = 0;
- /* Gurantee prange is migrate it */
+
+ bitmap_fill(prange->bitmap_access, MAX_GPU_INSTANCE);
svm_range_add_to_svms(prange);
svm_range_add_notifier_locked(mm, prange);
</pre>
</blockquote>
</blockquote>
</body>
</html>