aboutsummaryrefslogtreecommitdiffstats
path: root/meta-amd-bsp/recipes-kernel/linux/linux-yocto-4.14.71/2870-drm-amdkfd-no-process-eviction-is-scheduled-after-pr.patch
diff options
context:
space:
mode:
Diffstat (limited to 'meta-amd-bsp/recipes-kernel/linux/linux-yocto-4.14.71/2870-drm-amdkfd-no-process-eviction-is-scheduled-after-pr.patch')
-rw-r--r--meta-amd-bsp/recipes-kernel/linux/linux-yocto-4.14.71/2870-drm-amdkfd-no-process-eviction-is-scheduled-after-pr.patch41
1 files changed, 41 insertions, 0 deletions
diff --git a/meta-amd-bsp/recipes-kernel/linux/linux-yocto-4.14.71/2870-drm-amdkfd-no-process-eviction-is-scheduled-after-pr.patch b/meta-amd-bsp/recipes-kernel/linux/linux-yocto-4.14.71/2870-drm-amdkfd-no-process-eviction-is-scheduled-after-pr.patch
new file mode 100644
index 00000000..5ff6c73f
--- /dev/null
+++ b/meta-amd-bsp/recipes-kernel/linux/linux-yocto-4.14.71/2870-drm-amdkfd-no-process-eviction-is-scheduled-after-pr.patch
@@ -0,0 +1,41 @@
+From 884112efaea7ac06302fe149a17daae8d3a637d5 Mon Sep 17 00:00:00 2001
+From: Philip Yang <Philip.Yang@amd.com>
+Date: Fri, 24 Nov 2017 15:03:35 -0500
+Subject: [PATCH 2870/4131] drm/amdkfd: no process eviction is scheduled after
+ process destroy
+
+Firstly ensure eviction schedule will not find process through mm again
+by removing process from hash list. Then wait for eviction and restore
+work finish, and destroy process
+
+Change-Id: I7de877573b987be39f6cd561d2954e728b1ef452
+Signed-off-by: Philip Yang <Philip.Yang@amd.com>
+---
+ drivers/gpu/drm/amd/amdkfd/kfd_process.c | 6 +++---
+ 1 file changed, 3 insertions(+), 3 deletions(-)
+
+diff --git a/drivers/gpu/drm/amd/amdkfd/kfd_process.c b/drivers/gpu/drm/amd/amdkfd/kfd_process.c
+index 50ff3ef..2e16ee4 100644
+--- a/drivers/gpu/drm/amd/amdkfd/kfd_process.c
++++ b/drivers/gpu/drm/amd/amdkfd/kfd_process.c
+@@ -464,14 +464,14 @@ static void kfd_process_notifier_release(struct mmu_notifier *mn,
+ if (WARN_ON(p->mm != mm))
+ return;
+
+- cancel_delayed_work_sync(&p->eviction_work.dwork);
+- cancel_delayed_work_sync(&p->restore_work);
+-
+ mutex_lock(&kfd_processes_mutex);
+ hash_del_rcu(&p->kfd_processes);
+ mutex_unlock(&kfd_processes_mutex);
+ synchronize_srcu(&kfd_processes_srcu);
+
++ cancel_delayed_work_sync(&p->eviction_work.dwork);
++ cancel_delayed_work_sync(&p->restore_work);
++
+ mutex_lock(&p->mutex);
+
+ /* Iterate over all process device data structures and if the
+--
+2.7.4
+