From: Jonathan Cavitt <jonathan.cavitt@intel.com>
To: intel-gfx@lists.freedesktop.org
Cc: chris.p.wilson@linux.intel.com, jonathan.cavitt@intel.com,
andi.shyti@intel.com
Subject: [Intel-gfx] [PATCH 1/1] drm/i915/gt: Wait longer for tasks in migrate selftest
Date: Mon, 28 Aug 2023 12:28:52 -0700 [thread overview]
Message-ID: <20230828192852.2894671-2-jonathan.cavitt@intel.com> (raw)
In-Reply-To: <20230828192852.2894671-1-jonathan.cavitt@intel.com>
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>
---
drivers/gpu/drm/i915/gt/selftest_migrate.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/drivers/gpu/drm/i915/gt/selftest_migrate.c b/drivers/gpu/drm/i915/gt/selftest_migrate.c
index 3def5ca72dec..1a34cbe04fb6 100644
--- a/drivers/gpu/drm/i915/gt/selftest_migrate.c
+++ b/drivers/gpu/drm/i915/gt/selftest_migrate.c
@@ -710,7 +710,7 @@ static int threaded_migrate(struct intel_migrate *migrate,
thread[i].tsk = tsk;
}
- msleep(10); /* start all threads before we kthread_stop() */
+ msleep(10 * n_cpus); /* start all threads before we kthread_stop() */
for (i = 0; i < n_cpus; ++i) {
struct task_struct *tsk = thread[i].tsk;
--
2.25.1
next prev parent reply other threads:[~2023-08-28 19:39 UTC|newest]
Thread overview: 8+ messages / expand[flat|nested] mbox.gz Atom feed top
2023-08-28 19:28 [Intel-gfx] [PATCH 0/1] drm/i915/gt: Wait longer for tasks in migrate selftest Jonathan Cavitt
2023-08-28 19:28 ` Jonathan Cavitt [this message]
2023-08-31 15:01 ` [Intel-gfx] [PATCH 1/1] " Andi Shyti
2023-08-31 18:18 ` Andi Shyti
2023-08-28 20:48 ` [Intel-gfx] ✗ Fi.CI.BAT: failure for " Patchwork
2023-08-29 11:06 ` Andi Shyti
2023-08-29 16:10 ` [Intel-gfx] ✓ Fi.CI.BAT: success for drm/i915/gt: Wait longer for tasks in migrate selftest (rev2) Patchwork
2023-08-29 23:33 ` [Intel-gfx] ✓ Fi.CI.IGT: " Patchwork
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20230828192852.2894671-2-jonathan.cavitt@intel.com \
--to=jonathan.cavitt@intel.com \
--cc=andi.shyti@intel.com \
--cc=chris.p.wilson@linux.intel.com \
--cc=intel-gfx@lists.freedesktop.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.