Skip to content

Commit e26305f

Browse files
fxkamdalexdeucher
authored andcommitted
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: 9a1c133 ("drm/amdkfd: Run restore_workers on freezable WQs") Signed-off-by: Felix Kuehling <[email protected]> Reviewed-by: Philip Yang <[email protected]> Tested-by: Yunxiang Li <[email protected]> Signed-off-by: Alex Deucher <[email protected]> Cc: [email protected]
1 parent b0b13d5 commit e26305f

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

drivers/gpu/drm/amd/amdkfd/kfd_process.c

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -2012,9 +2012,9 @@ static void restore_process_worker(struct work_struct *work)
20122012
if (ret) {
20132013
pr_debug("Failed to restore BOs of pasid 0x%x, retry after %d ms\n",
20142014
p->pasid, PROCESS_BACK_OFF_TIME_MS);
2015-
ret = queue_delayed_work(kfd_restore_wq, &p->restore_work,
2016-
msecs_to_jiffies(PROCESS_BACK_OFF_TIME_MS));
2017-
WARN(!ret, "reschedule restore work failed\n");
2015+
if (mod_delayed_work(kfd_restore_wq, &p->restore_work,
2016+
msecs_to_jiffies(PROCESS_RESTORE_TIME_MS)))
2017+
kfd_process_restore_queues(p);
20182018
}
20192019
}
20202020

0 commit comments

Comments
 (0)