* [PATCH v2 0/2] Job cancel tests
@ 2024-06-08 0:12 Matthew Brost
2024-06-08 0:12 ` [PATCH v2 1/2] xe_exec_reset: Add job " Matthew Brost
` (2 more replies)
0 siblings, 3 replies; 5+ messages in thread
From: Matthew Brost @ 2024-06-08 0:12 UTC (permalink / raw)
To: igt-dev; +Cc: intel-xe
Tests following series:
[1] https://patchwork.freedesktop.org/series/134593/
Matthew Brost (2):
xe_exec_reset: Add job cancel tests
xe_exec_reset: Add timeslice preempt test
tests/intel/xe_exec_reset.c | 44 ++++++++++++++++++++++++++++++++++---
1 file changed, 41 insertions(+), 3 deletions(-)
--
2.34.1
^ permalink raw reply [flat|nested] 5+ messages in thread
* [PATCH v2 1/2] xe_exec_reset: Add job cancel tests
2024-06-08 0:12 [PATCH v2 0/2] Job cancel tests Matthew Brost
@ 2024-06-08 0:12 ` Matthew Brost
2024-06-08 0:12 ` [PATCH v2 2/2] xe_exec_reset: Add timeslice preempt test Matthew Brost
2024-06-08 0:16 ` ✗ CI.Patch_applied: failure for Job cancel tests Patchwork
2 siblings, 0 replies; 5+ messages in thread
From: Matthew Brost @ 2024-06-08 0:12 UTC (permalink / raw)
To: igt-dev; +Cc: intel-xe
This test has pulled out when the ability to set the job timeout via
IOCTL was removed from the uAPI while upstreaming Xe. Add this coverage
back in but only run on a single hardware engine given by default jobs
take 5 seconds to timeout.
Signed-off-by: Matthew Brost <matthew.brost@intel.com>
---
tests/intel/xe_exec_reset.c | 21 ++++++++++++++++++++-
1 file changed, 20 insertions(+), 1 deletion(-)
diff --git a/tests/intel/xe_exec_reset.c b/tests/intel/xe_exec_reset.c
index 8d731e6893..5e9e48adda 100644
--- a/tests/intel/xe_exec_reset.c
+++ b/tests/intel/xe_exec_reset.c
@@ -99,6 +99,7 @@ static void test_spin(int fd, struct drm_xe_engine_class_instance *eci)
#define VIRTUAL (0x1 << 3)
#define PARALLEL (0x1 << 4)
#define CAT_ERROR (0x1 << 5)
+#define PREEMPT (0x1 << 6)
/**
* SUBTEST: %s-cat-error
@@ -280,6 +281,12 @@ test_balancer(int fd, int gt, int class, int n_exec_queues, int n_execs,
* SUBTEST: cat-error
* Description: Test cat error
*
+ * SUBTEST: cancel
+ * Description: Test job cancel
+ *
+ * SUBTEST: cancel-preempt
+ * Description: Test job cancel with a preemptable job
+ *
* SUBTEST: gt-reset
* Description: Test GT reset
*
@@ -318,7 +325,7 @@ test_legacy_mode(int fd, struct drm_xe_engine_class_instance *eci,
uint64_t pad;
uint32_t data;
} *data;
- struct xe_spin_opts spin_opts = { .preempt = false };
+ struct xe_spin_opts spin_opts = { .preempt = flags & PREEMPT };
int i, b;
igt_assert(n_exec_queues <= MAX_N_EXECQUEUES);
@@ -727,6 +734,18 @@ igt_main
xe_for_each_engine(fd, hwe)
test_legacy_mode(fd, hwe, 2, 2, CAT_ERROR);
+ igt_subtest("cancel")
+ xe_for_each_engine(fd, hwe) {
+ test_legacy_mode(fd, hwe, 1, 1, 0);
+ break;
+ }
+
+ igt_subtest("cancel-preempt")
+ xe_for_each_engine(fd, hwe) {
+ test_legacy_mode(fd, hwe, 1, 1, PREEMPT);
+ break;
+ }
+
igt_subtest("gt-reset")
xe_for_each_engine(fd, hwe)
test_legacy_mode(fd, hwe, 2, 2, GT_RESET);
--
2.34.1
^ permalink raw reply related [flat|nested] 5+ messages in thread
* [PATCH v2 2/2] xe_exec_reset: Add timeslice preempt test
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
2024-06-14 13:53 ` Kamil Konieczny
2024-06-08 0:16 ` ✗ CI.Patch_applied: failure for Job cancel tests Patchwork
2 siblings, 1 reply; 5+ messages in thread
From: Matthew Brost @ 2024-06-08 0:12 UTC (permalink / raw)
To: igt-dev; +Cc: intel-xe
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
^ permalink raw reply related [flat|nested] 5+ messages in thread
* ✗ CI.Patch_applied: failure for Job cancel tests
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 ` [PATCH v2 2/2] xe_exec_reset: Add timeslice preempt test Matthew Brost
@ 2024-06-08 0:16 ` Patchwork
2 siblings, 0 replies; 5+ messages in thread
From: Patchwork @ 2024-06-08 0:16 UTC (permalink / raw)
To: Matthew Brost; +Cc: intel-xe
== Series Details ==
Series: Job cancel tests
URL : https://patchwork.freedesktop.org/series/134641/
State : failure
== Summary ==
=== Applying kernel patches on branch 'drm-tip' with base: ===
Base commit: 2bea08bd3129 drm-tip: 2024y-06m-07d-19h-26m-01s UTC integration manifest
=== git am output follows ===
error: tests/intel/xe_exec_reset.c: does not exist in index
hint: Use 'git am --show-current-patch=diff' to see the failed patch
Applying: xe_exec_reset: Add job cancel tests
Patch failed at 0001 xe_exec_reset: Add job cancel tests
When you have resolved this problem, run "git am --continue".
If you prefer to skip this patch, run "git am --skip" instead.
To restore the original branch and stop patching, run "git am --abort".
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: [PATCH v2 2/2] xe_exec_reset: Add timeslice preempt test
2024-06-08 0:12 ` [PATCH v2 2/2] xe_exec_reset: Add timeslice preempt test Matthew Brost
@ 2024-06-14 13:53 ` Kamil Konieczny
0 siblings, 0 replies; 5+ messages in thread
From: Kamil Konieczny @ 2024-06-14 13:53 UTC (permalink / raw)
To: igt-dev; +Cc: Matthew Brost, intel-xe
Hi Matthew,
On 2024-06-07 at 17:12:11 -0700, Matthew Brost wrote:
you did Cc to intel-xe list, in that case please add i-g-t
after PATCH:
[PATCH i-g-t v2 2/2] xe_exec_reset: Add timeslice preempt test
> 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.
Please explain what TDR means, like: in the TDR (T... D... R...).
Regards,
Kamil
>
> 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
>
^ permalink raw reply [flat|nested] 5+ messages in thread
end of thread, other threads:[~2024-06-14 13:53 UTC | newest]
Thread overview: 5+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
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 ` [PATCH v2 2/2] xe_exec_reset: Add timeslice preempt test Matthew Brost
2024-06-14 13:53 ` Kamil Konieczny
2024-06-08 0:16 ` ✗ CI.Patch_applied: failure for Job cancel tests Patchwork
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox