All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH 1/2] drm/amdkfd: set prefetch GPU has access attribute
@ 2021-05-05 17:56 Philip Yang
  2021-05-05 17:56 ` [PATCH 2/2] drm/amdkfd: set new unregistered range accessible by GPU Philip Yang
  2021-05-05 20:01 ` [PATCH 1/2] drm/amdkfd: set prefetch GPU has access attribute Felix Kuehling
  0 siblings, 2 replies; 10+ messages in thread
From: Philip Yang @ 2021-05-05 17:56 UTC (permalink / raw)
  To: amd-gfx; +Cc: Philip Yang

After svm range prefetch and migrate to GPU, if GPU has no access or
access in place attribute, add GPU to range access_bitmap to be able to
update GPU page table.

Signed-off-by: Philip Yang <Philip.Yang@amd.com>
---
 drivers/gpu/drm/amd/amdkfd/kfd_svm.c | 11 +++++++++++
 1 file changed, 11 insertions(+)

diff --git a/drivers/gpu/drm/amd/amdkfd/kfd_svm.c b/drivers/gpu/drm/amd/amdkfd/kfd_svm.c
index d9111fea724b..3b640772d9c5 100644
--- a/drivers/gpu/drm/amd/amdkfd/kfd_svm.c
+++ b/drivers/gpu/drm/amd/amdkfd/kfd_svm.c
@@ -2869,6 +2869,17 @@ svm_range_set_attr(struct kfd_process *p, uint64_t start, uint64_t size,
 			continue;
 		}
 
+		if (migrated && prange->prefetch_loc) {
+			int gpuidx;
+
+			gpuidx = kfd_process_gpuidx_from_gpuid(p,
+							prange->prefetch_loc);
+			if (gpuidx >= 0 &&
+			    !test_bit(gpuidx, prange->bitmap_access) &&
+			    !test_bit(gpuidx, prange->bitmap_aip))
+				bitmap_set(prange->bitmap_access, gpuidx, 1);
+		}
+
 		r = svm_range_validate_and_map(mm, prange, MAX_GPU_INSTANCE,
 					       true, true);
 		if (r)
-- 
2.17.1

_______________________________________________
amd-gfx mailing list
amd-gfx@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/amd-gfx

^ permalink raw reply related	[flat|nested] 10+ messages in thread

end of thread, other threads:[~2021-05-11 15:40 UTC | newest]

Thread overview: 10+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2021-05-05 17:56 [PATCH 1/2] drm/amdkfd: set prefetch GPU has access attribute Philip Yang
2021-05-05 17:56 ` [PATCH 2/2] drm/amdkfd: set new unregistered range accessible by GPU Philip Yang
2021-05-05 20:03   ` Felix Kuehling
2021-05-07 19:07   ` [PATCH 2/2] drm/amdkfd: unregistered range accessible by all GPUs Philip Yang
2021-05-10 12:56     ` Felix Kuehling
2021-05-11 15:14       ` philip yang
2021-05-11 15:15   ` [PATCH v2 2/2] drm/amdkfd: new " Philip Yang
2021-05-11 15:39     ` Felix Kuehling
2021-05-05 20:01 ` [PATCH 1/2] drm/amdkfd: set prefetch GPU has access attribute Felix Kuehling
2021-05-05 20:10   ` Felix Kuehling

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.