From: Matthew Brost <matthew.brost@intel.com>
To: igt-dev@lists.freedesktop.org
Cc: intel-xe@lists.freedesktop.org
Subject: [PATCH v2 2/2] xe_exec_reset: Add timeslice preempt test
Date: Fri, 7 Jun 2024 17:12:11 -0700 [thread overview]
Message-ID: <20240608001211.2365347-3-matthew.brost@intel.com> (raw)
In-Reply-To: <20240608001211.2365347-1-matthew.brost@intel.com>
Add tests in which submit multiple preemptable spinners to same hardware
engine ensuring a cumulative longer timeout and validating the restart
paths in the TDR.
Signed-off-by: Matthew Brost <matthew.brost@intel.com>
---
tests/intel/xe_exec_reset.c | 23 +++++++++++++++++++++--
1 file changed, 21 insertions(+), 2 deletions(-)
diff --git a/tests/intel/xe_exec_reset.c b/tests/intel/xe_exec_reset.c
index 5e9e48adda..144e3b3884 100644
--- a/tests/intel/xe_exec_reset.c
+++ b/tests/intel/xe_exec_reset.c
@@ -100,6 +100,7 @@ static void test_spin(int fd, struct drm_xe_engine_class_instance *eci)
#define PARALLEL (0x1 << 4)
#define CAT_ERROR (0x1 << 5)
#define PREEMPT (0x1 << 6)
+#define CANCEL (0x1 << 7)
/**
* SUBTEST: %s-cat-error
@@ -287,6 +288,12 @@ test_balancer(int fd, int gt, int class, int n_exec_queues, int n_execs,
* SUBTEST: cancel-preempt
* Description: Test job cancel with a preemptable job
*
+ * SUBTEST: cancel-timeslice-preempt
+ * Description: Test job cancel with 2 preemptable jobs
+ *
+ * SUBTEST: cancel-timeslice-many-preempt
+ * Description: Test job cancel with many preemptable jobs
+ *
* SUBTEST: gt-reset
* Description: Test GT reset
*
@@ -361,7 +368,7 @@ test_legacy_mode(int fd, struct drm_xe_engine_class_instance *eci,
uint64_t exec_addr;
int e = i % n_exec_queues;
- if (!i) {
+ if (!i || flags & CANCEL) {
spin_opts.addr = base_addr + spin_offset;
xe_spin_init(&data[i].spin, &spin_opts);
exec_addr = spin_opts.addr;
@@ -411,7 +418,7 @@ test_legacy_mode(int fd, struct drm_xe_engine_class_instance *eci,
xe_vm_unbind_async(fd, vm, 0, 0, addr, bo_size, sync, 1);
igt_assert(syncobj_wait(fd, &sync[0].handle, 1, INT64_MAX, 0, NULL));
- if (!(flags & GT_RESET)) {
+ if (!(flags & (GT_RESET | CANCEL))) {
for (i = 1; i < n_execs; i++)
igt_assert_eq(data[i].data, 0xc0ffee);
}
@@ -746,6 +753,18 @@ igt_main
break;
}
+ igt_subtest("cancel-timeslice-preempt")
+ xe_for_each_engine(fd, hwe) {
+ test_legacy_mode(fd, hwe, 2, 2, CANCEL | PREEMPT);
+ break;
+ }
+
+ igt_subtest("cancel-timeslice-many-preempt")
+ xe_for_each_engine(fd, hwe) {
+ test_legacy_mode(fd, hwe, 4, 4, CANCEL | PREEMPT);
+ break;
+ }
+
igt_subtest("gt-reset")
xe_for_each_engine(fd, hwe)
test_legacy_mode(fd, hwe, 2, 2, GT_RESET);
--
2.34.1
next prev parent reply other threads:[~2024-06-08 0:11 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
2024-06-08 0:12 [PATCH v2 0/2] Job cancel tests Matthew Brost
2024-06-08 0:12 ` [PATCH v2 1/2] xe_exec_reset: Add job " Matthew Brost
2024-06-08 0:12 ` Matthew Brost [this message]
2024-06-14 13:53 ` [PATCH v2 2/2] xe_exec_reset: Add timeslice preempt test Kamil Konieczny
2024-06-08 0:16 ` ✗ CI.Patch_applied: failure for Job cancel tests 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=20240608001211.2365347-3-matthew.brost@intel.com \
--to=matthew.brost@intel.com \
--cc=igt-dev@lists.freedesktop.org \
--cc=intel-xe@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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox