Skip to content

Commit fb4e4c5

Browse files
Jonathan-CavittAndi Shyti
authored andcommitted
drm/i915/gt: Wait longer for tasks in migrate selftest
The thread_global_copy subtest of the live migrate selftest creates a large number of threads and waits 10ms for them all to start. This is not enough time to wait for the threaded tasks to start, as some may need to wait for additional ring space to be granted. Threads that do so are at risk of getting stopped (signaled) in the middle of waiting for additional space, which can result in ERESTARTSYS getting reported erroneously by i915_request_wait. Instead of waiting a flat 10ms for the threads to start, wait 10ms per thread. This grants enough of a buffer for each thread to wait for additional ring space when needed. Signed-off-by: Jonathan Cavitt <jonathan.cavitt@intel.com> Reviewed-by: Andi Shyti <andi.shyti@linux.intel.com> Signed-off-by: Andi Shyti <andi.shyti@linux.intel.com> Link: https://patchwork.freedesktop.org/patch/msgid/20230828192852.2894671-2-jonathan.cavitt@intel.com
1 parent 2804106 commit fb4e4c5

1 file changed

Lines changed: 1 addition & 1 deletion

File tree

drivers/gpu/drm/i915/gt/selftest_migrate.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -710,7 +710,7 @@ static int threaded_migrate(struct intel_migrate *migrate,
710710
thread[i].tsk = tsk;
711711
}
712712

713-
msleep(10); /* start all threads before we kthread_stop() */
713+
msleep(10 * n_cpus); /* start all threads before we kthread_stop() */
714714

715715
for (i = 0; i < n_cpus; ++i) {
716716
struct task_struct *tsk = thread[i].tsk;

0 commit comments

Comments
 (0)