From e6c58adbc94028b40f8ccb9695e34f2235d334a4 Mon Sep 17 00:00:00 2001 From: Harish Kasiviswanathan 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 --- 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