summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorFelix Kuehling <felix.kuehling@amd.com>2024-04-19 13:25:58 -0400
committerAlex Deucher <alexander.deucher@amd.com>2024-04-26 17:22:38 -0400
commitf989ecccdf6bfe985b89d713db1b6c46ae582b64 (patch)
tree2654a02731302c2e15147c2e2766f939514a126c
parente76691f45a60bf71a3210c4fb2abd492b26bd4a6 (diff)
downloadlinux-stable-f989ecccdf6bfe985b89d713db1b6c46ae582b64.tar.gz
linux-stable-f989ecccdf6bfe985b89d713db1b6c46ae582b64.tar.bz2
linux-stable-f989ecccdf6bfe985b89d713db1b6c46ae582b64.zip
drm/amdkfd: Fix rescheduling of restore worker
Handle the case that the restore worker was already scheduled by another eviction while the restore was in progress. Fixes: 9a1c1339abf9 ("drm/amdkfd: Run restore_workers on freezable WQs") Signed-off-by: Felix Kuehling <felix.kuehling@amd.com> Reviewed-by: Philip Yang <Philip.Yang@amd.com> Tested-by: Yunxiang Li <Yunxiang.Li@amd.com> Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
-rw-r--r--drivers/gpu/drm/amd/amdkfd/kfd_process.c6
1 files 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 aafdf064651f..58c1fe542193 100644
--- a/drivers/gpu/drm/amd/amdkfd/kfd_process.c
+++ b/drivers/gpu/drm/amd/amdkfd/kfd_process.c
@@ -2012,9 +2012,9 @@ static void restore_process_worker(struct work_struct *work)
if (ret) {
pr_debug("Failed to restore BOs of pasid 0x%x, retry after %d ms\n",
p->pasid, PROCESS_BACK_OFF_TIME_MS);
- ret = queue_delayed_work(kfd_restore_wq, &p->restore_work,
- msecs_to_jiffies(PROCESS_BACK_OFF_TIME_MS));
- WARN(!ret, "reschedule restore work failed\n");
+ if (mod_delayed_work(kfd_restore_wq, &p->restore_work,
+ msecs_to_jiffies(PROCESS_RESTORE_TIME_MS)))
+ kfd_process_restore_queues(p);
}
}