diff options
author | Eric Huang <jinhuieric.huang@amd.com> | 2022-06-24 18:15:28 +0300 |
---|---|---|
committer | Alex Deucher <alexander.deucher@amd.com> | 2022-07-07 22:52:47 +0300 |
commit | 7d261c50d9c1adb70f6ac2e26edbc64c774c21ca (patch) | |
tree | cea40188e3afb64ee6be68a143f766f74fa3eb9a /drivers/gpu/drm/amd/amdkfd/kfd_svm.c | |
parent | fce7bf30d3309ea325a7ec452456f8f7c079f622 (diff) | |
download | linux-7d261c50d9c1adb70f6ac2e26edbc64c774c21ca.tar.xz |
drm/amdkfd: change svm range evict
Adding always evict queues when flag is set to
KFD_IOCTL_SVM_FLAG_GPU_ALWAYS_MAPPED as if XNACK off.
Signed-off-by: Eric Huang <jinhuieric.huang@amd.com>
Reviewed-by: Felix Kuehling <Felix.Kuehling@amd.com>
Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
Diffstat (limited to 'drivers/gpu/drm/amd/amdkfd/kfd_svm.c')
-rw-r--r-- | drivers/gpu/drm/amd/amdkfd/kfd_svm.c | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/drivers/gpu/drm/amd/amdkfd/kfd_svm.c b/drivers/gpu/drm/amd/amdkfd/kfd_svm.c index fd89951c29fe..a2d103ce26c7 100644 --- a/drivers/gpu/drm/amd/amdkfd/kfd_svm.c +++ b/drivers/gpu/drm/amd/amdkfd/kfd_svm.c @@ -1775,7 +1775,8 @@ svm_range_evict(struct svm_range *prange, struct mm_struct *mm, pr_debug("invalidate svms 0x%p prange [0x%lx 0x%lx] [0x%lx 0x%lx]\n", svms, prange->start, prange->last, start, last); - if (!p->xnack_enabled) { + if (!p->xnack_enabled || + (prange->flags & KFD_IOCTL_SVM_FLAG_GPU_ALWAYS_MAPPED)) { int evicted_ranges; list_for_each_entry(pchild, &prange->child_list, child_list) { @@ -3343,7 +3344,8 @@ svm_range_set_attr(struct kfd_process *p, struct mm_struct *mm, if (r) goto out_unlock_range; - if (migrated && !p->xnack_enabled) { + if (migrated && (!p->xnack_enabled || + (prange->flags & KFD_IOCTL_SVM_FLAG_GPU_ALWAYS_MAPPED))) { pr_debug("restore_work will update mappings of GPUs\n"); mutex_unlock(&prange->migrate_mutex); continue; |