aboutsummaryrefslogtreecommitdiff
path: root/drivers/gpu/drm/amd/amdkfd/kfd_svm.h
diff options
context:
space:
mode:
authorGravatar Felix Kuehling <Felix.Kuehling@amd.com> 2021-02-24 18:47:52 -0500
committerGravatar Alex Deucher <alexander.deucher@amd.com> 2021-04-20 21:47:27 -0400
commit8a7c184a16d73ab25360e0f5997f82306ff5d5a2 (patch)
treedf31fa3b64fa1b0408615e16785757751da618c3 /drivers/gpu/drm/amd/amdkfd/kfd_svm.h
parentdrm/amdkfd: map svm range to GPUs (diff)
downloadlinux-8a7c184a16d73ab25360e0f5997f82306ff5d5a2.tar.gz
linux-8a7c184a16d73ab25360e0f5997f82306ff5d5a2.tar.bz2
linux-8a7c184a16d73ab25360e0f5997f82306ff5d5a2.zip
drm/amdkfd: svm range eviction and restore
HMM interval notifier callback notify CPU page table will be updated, stop process queues if the updated address belongs to svm range registered in process svms objects tree. Scheduled restore work to update GPU page table using new pages address in the updated svm range. The restore worker flushes any deferred work to make sure it restores an up-to-date svm_range_list. Signed-off-by: Philip Yang <Philip.Yang@amd.com> Reviewed-by: Felix Kuehling <Felix.Kuehling@amd.com> Signed-off-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.h')
-rw-r--r--drivers/gpu/drm/amd/amdkfd/kfd_svm.h2
1 files changed, 2 insertions, 0 deletions
diff --git a/drivers/gpu/drm/amd/amdkfd/kfd_svm.h b/drivers/gpu/drm/amd/amdkfd/kfd_svm.h
index 5949890bf48c..3c94899c5c40 100644
--- a/drivers/gpu/drm/amd/amdkfd/kfd_svm.h
+++ b/drivers/gpu/drm/amd/amdkfd/kfd_svm.h
@@ -67,6 +67,7 @@ struct svm_work_list_item {
* @perfetch_loc: last prefetch location, 0 for CPU, or GPU id
* @actual_loc: the actual location, 0 for CPU, or GPU id
* @granularity:migration granularity, log2 num pages
+ * @invalid: not 0 means cpu page table is invalidated
* @notifier: register mmu interval notifier
* @work_item: deferred work item information
* @deferred_list: list header used to add range to deferred list
@@ -97,6 +98,7 @@ struct svm_range {
uint32_t prefetch_loc;
uint32_t actual_loc;
uint8_t granularity;
+ atomic_t invalid;
struct mmu_interval_notifier notifier;
struct svm_work_list_item work_item;
struct list_head deferred_list;