aboutsummaryrefslogtreecommitdiffstats
path: root/meta-amd-bsp/recipes-kernel/linux/linux-yocto-4.14.71/1252-drm-amdkfd-Reduce-KFD-restore-wait-time.patch
blob: 8ee8956d85577db6cccc6421b29b2eb2b1b9a51f (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
From e6c58adbc94028b40f8ccb9695e34f2235d334a4 Mon Sep 17 00:00:00 2001
From: Harish Kasiviswanathan <Harish.Kasiviswanathan@amd.com>
Date: Tue, 28 Mar 2017 15:25:15 -0400
Subject: [PATCH 1252/4131] drm/amdkfd: Reduce KFD restore wait time

Change-Id: I455296dd665a768ca8aefe7863f25e3dac952d4f
Signed-off-by: Harish Kasiviswanathan <Harish.Kasiviswanathan@amd.com>
---
 drivers/gpu/drm/amd/amdkfd/kfd_device.c | 3 ++-
 drivers/gpu/drm/amd/amdkfd/kfd_priv.h   | 6 +++---
 2 files changed, 5 insertions(+), 4 deletions(-)

diff --git a/drivers/gpu/drm/amd/amdkfd/kfd_device.c b/drivers/gpu/drm/amd/amdkfd/kfd_device.c
index 0e95fb2..53720bd 100644
--- a/drivers/gpu/drm/amd/amdkfd/kfd_device.c
+++ b/drivers/gpu/drm/amd/amdkfd/kfd_device.c
@@ -867,7 +867,8 @@ void kfd_restore_bo_worker(struct work_struct *work)
 
 	ret = pdd->dev->kfd2kgd->restore_process_bos(p->process_info);
 	if (ret) {
-		pr_info("restore_process_bos() failed, try again after 1 sec\n");
+		pr_info("Restore failed, try again after %d ms\n",
+			PROCESS_BACK_OFF_TIME_MS);
 		ret = schedule_delayed_work(&p->restore_work,
 				PROCESS_BACK_OFF_TIME_MS);
 		WARN(!ret, "reschedule restore work failed\n");
diff --git a/drivers/gpu/drm/amd/amdkfd/kfd_priv.h b/drivers/gpu/drm/amd/amdkfd/kfd_priv.h
index 853d430..992e5f1 100644
--- a/drivers/gpu/drm/amd/amdkfd/kfd_priv.h
+++ b/drivers/gpu/drm/amd/amdkfd/kfd_priv.h
@@ -579,10 +579,10 @@ struct kfd_eviction_work {
 	struct fence *eviction_fence;
 };
 
-/* Appox. wait time before attempting to restore evicted BOs */
-#define PROCESS_RESTORE_TIME_MS 2000
+/* Approx. wait time before attempting to restore evicted BOs */
+#define PROCESS_RESTORE_TIME_MS 100
 /* Approx. back off time if restore fails due to lack of memory */
-#define PROCESS_BACK_OFF_TIME_MS 1000
+#define PROCESS_BACK_OFF_TIME_MS 100
 
 void kfd_evict_bo_worker(struct work_struct *work);
 void kfd_restore_bo_worker(struct work_struct *work);
-- 
2.7.4