* [PATCH i-g-t v2 1/2] tests/gem_exec_schedule: Add reset on failed preemption test.
@ 2017-12-04 23:45 Antonio Argenziano
2017-12-04 23:45 ` [PATCH i-g-t v2 2/2] tests/gem_exec_schedule: Add test for resetting preemptive batch Antonio Argenziano
` (5 more replies)
0 siblings, 6 replies; 11+ messages in thread
From: Antonio Argenziano @ 2017-12-04 23:45 UTC (permalink / raw)
To: intel-gfx
This patch adds a test where a low priority batch is going to be
declared hung while a preemption is pending. The test wants to verify
that a 'hanging' low priority batch will not disrupt the execution of a high
priority context and that the driver does due diligence in managing a
reset while a preemption is pending.
-v2:
- Use igt_hang_ctx to hang the engine (Chris)
- Enable/Process engine reset using IGT libs (Chris)
- Create new subtest_group for the test (Chris)
Cc: Chris Wilson <chris@chris-wilson.co.uk>
Cc: Michal Winiarski <michal.winiarski@intel.com>
Signed-off-by: Antonio Argenziano <antonio.argenziano@intel.com>
---
tests/gem_exec_schedule.c | 28 +++++++++++++++++++++++++++-
1 file changed, 27 insertions(+), 1 deletion(-)
diff --git a/tests/gem_exec_schedule.c b/tests/gem_exec_schedule.c
index a2f4419a..d0f85b3e 100644
--- a/tests/gem_exec_schedule.c
+++ b/tests/gem_exec_schedule.c
@@ -356,13 +356,15 @@ static void promotion(int fd, unsigned ring)
munmap(ptr, 4096);
}
-#define NEW_CTX 0x1
+#define NEW_CTX (0x1 << 0)
+#define HANG_LP (0x1 << 1)
static void preempt(int fd, unsigned ring, unsigned flags)
{
uint32_t result = gem_create(fd, 4096);
uint32_t *ptr = gem_mmap__gtt(fd, result, 4096, PROT_READ);
igt_spin_t *spin[16];
uint32_t ctx[2];
+ igt_hang_t hang;
ctx[LO] = gem_context_create(fd);
gem_context_set_priority(fd, ctx[LO], MIN_PRIO);
@@ -370,6 +372,9 @@ static void preempt(int fd, unsigned ring, unsigned flags)
ctx[HI] = gem_context_create(fd);
gem_context_set_priority(fd, ctx[HI], MAX_PRIO);
+ if (flags & HANG_LP)
+ hang = igt_hang_ctx(fd, ctx[LO], ring, 0, NULL);
+
for (int n = 0; n < 16; n++) {
if (flags & NEW_CTX) {
gem_context_destroy(fd, ctx[LO]);
@@ -389,6 +394,9 @@ static void preempt(int fd, unsigned ring, unsigned flags)
for (int n = 0; n < 16; n++)
igt_spin_batch_free(fd, spin[n]);
+ if (flags & HANG_LP)
+ igt_post_hang_ring(fd, hang);
+
gem_context_destroy(fd, ctx[LO]);
gem_context_destroy(fd, ctx[HI]);
@@ -1023,6 +1031,24 @@ igt_main
igt_subtest_f("preempt-self-%s", e->name)
preempt_self(fd, e->exec_id | e->flags);
+
+ igt_subtest_group {
+ igt_hang_t hang;
+
+ igt_fixture {
+ igt_stop_hang_detector();
+ hang = igt_allow_hang(fd, 0, 0);
+ }
+
+ igt_subtest_f("preempt-hang-%s", e->name) {
+ preempt(fd, e->exec_id | e->flags, NEW_CTX | HANG_LP);
+ }
+
+ igt_fixture {
+ igt_disallow_hang(fd, hang);
+ igt_fork_hang_detector(fd);
+ }
+ }
}
igt_subtest_f("deep-%s", e->name)
--
2.14.2
_______________________________________________
Intel-gfx mailing list
Intel-gfx@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/intel-gfx
^ permalink raw reply related [flat|nested] 11+ messages in thread
* [PATCH i-g-t v2 2/2] tests/gem_exec_schedule: Add test for resetting preemptive batch
2017-12-04 23:45 [PATCH i-g-t v2 1/2] tests/gem_exec_schedule: Add reset on failed preemption test Antonio Argenziano
@ 2017-12-04 23:45 ` Antonio Argenziano
2017-12-08 21:58 ` Michał Winiarski
` (2 more replies)
2017-12-05 0:13 ` ✓ Fi.CI.BAT: success for series starting with [v2,1/2] tests/gem_exec_schedule: Add reset on failed preemption test Patchwork
` (4 subsequent siblings)
5 siblings, 3 replies; 11+ messages in thread
From: Antonio Argenziano @ 2017-12-04 23:45 UTC (permalink / raw)
To: intel-gfx
This patch adds a test that will trigger a preemption of a low priority
batch by a 'bad' batch buffer which will hang. The test aims at making
sure that a hanging high priority batch will not disrupt the submission
flow of low priority contexts.
-v2:
- Rename subtest (Chris)
- Use igt_hang_ctx to hang ring (Chris)
- Add comment on execution order checks (Chris)
Cc: Chris Wilson <chris@chris-wilson.co.uk>
Cc: Michal Winiarski <michal.winiarski@intel.com>
Signed-off-by: Antonio Argenziano <antonio.argenziano@intel.com>
---
tests/gem_exec_schedule.c | 37 +++++++++++++++++++++++++++++++++++++
1 file changed, 37 insertions(+)
diff --git a/tests/gem_exec_schedule.c b/tests/gem_exec_schedule.c
index d0f85b3e..0c2efaa2 100644
--- a/tests/gem_exec_schedule.c
+++ b/tests/gem_exec_schedule.c
@@ -515,6 +515,40 @@ static void preempt_self(int fd, unsigned ring)
gem_close(fd, result);
}
+static void preemptive_hang(int fd, unsigned ring)
+{
+ igt_spin_t *spin[16];
+ igt_hang_t hang;
+ uint32_t ctx[2];
+
+ ctx[HI] = gem_context_create(fd);
+ gem_context_set_priority(fd, ctx[HI], MAX_PRIO);
+
+ for (int n = 0; n < 16; n++) {
+ ctx[LO] = gem_context_create(fd);
+ gem_context_set_priority(fd, ctx[LO], MIN_PRIO);
+
+ spin[n] = __igt_spin_batch_new(fd, ctx[LO], ring, 0);
+ igt_debug("spin[%d].handle=%d\n", n, spin[n]->handle);
+
+ gem_context_destroy(fd, ctx[LO]);
+ }
+
+ hang = igt_hang_ctx(fd, ctx[HI], ring, 0, NULL);
+ gem_wait(fd, hang.handle, NULL);
+
+ for (int n = 0; n < 16; n++) {
+ /* Current behavior is to execute requests in order of submission.
+ * This is subject to change as the scheduler evolve. The test should
+ * be updated to reflect such changes.
+ */
+ igt_assert(gem_bo_busy(fd, spin[n]->handle));
+ igt_spin_batch_free(fd, spin[n]);
+ }
+
+ gem_context_destroy(fd, ctx[HI]);
+}
+
static void deep(int fd, unsigned ring)
{
#define XS 8
@@ -1044,6 +1078,9 @@ igt_main
preempt(fd, e->exec_id | e->flags, NEW_CTX | HANG_LP);
}
+ igt_subtest_f("preemptive-hang-%s", e->name)
+ preemptive_hang(fd, e->exec_id | e->flags);
+
igt_fixture {
igt_disallow_hang(fd, hang);
igt_fork_hang_detector(fd);
--
2.14.2
_______________________________________________
Intel-gfx mailing list
Intel-gfx@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/intel-gfx
^ permalink raw reply related [flat|nested] 11+ messages in thread
* ✓ Fi.CI.BAT: success for series starting with [v2,1/2] tests/gem_exec_schedule: Add reset on failed preemption test.
2017-12-04 23:45 [PATCH i-g-t v2 1/2] tests/gem_exec_schedule: Add reset on failed preemption test Antonio Argenziano
2017-12-04 23:45 ` [PATCH i-g-t v2 2/2] tests/gem_exec_schedule: Add test for resetting preemptive batch Antonio Argenziano
@ 2017-12-05 0:13 ` Patchwork
2017-12-05 1:08 ` ✓ Fi.CI.IGT: " Patchwork
` (3 subsequent siblings)
5 siblings, 0 replies; 11+ messages in thread
From: Patchwork @ 2017-12-05 0:13 UTC (permalink / raw)
To: Antonio Argenziano; +Cc: intel-gfx
== Series Details ==
Series: series starting with [v2,1/2] tests/gem_exec_schedule: Add reset on failed preemption test.
URL : https://patchwork.freedesktop.org/series/34874/
State : success
== Summary ==
IGT patchset tested on top of latest successful build
88b01d822be1e9ab429ef1085f6754a47dae3487 igt/pm_rc6_residency: Measure residency after checking for applicability
with latest DRM-Tip kernel build CI_DRM_3452
cee3f135bf4e drm-tip: 2017y-12m-04d-21h-06m-29s UTC integration manifest
Testlist changes:
+igt@gem_exec_schedule@preemptive-hang-blt
+igt@gem_exec_schedule@preemptive-hang-bsd
+igt@gem_exec_schedule@preemptive-hang-bsd1
+igt@gem_exec_schedule@preemptive-hang-bsd2
+igt@gem_exec_schedule@preemptive-hang-render
+igt@gem_exec_schedule@preemptive-hang-vebox
+igt@gem_exec_schedule@preempt-hang-blt
+igt@gem_exec_schedule@preempt-hang-bsd
+igt@gem_exec_schedule@preempt-hang-bsd1
+igt@gem_exec_schedule@preempt-hang-bsd2
+igt@gem_exec_schedule@preempt-hang-render
+igt@gem_exec_schedule@preempt-hang-vebox
Test debugfs_test:
Subgroup read_all_entries:
dmesg-fail -> DMESG-WARN (fi-elk-e7500) fdo#103989
fdo#103989 https://bugs.freedesktop.org/show_bug.cgi?id=103989
fi-bdw-5557u total:288 pass:267 dwarn:0 dfail:0 fail:0 skip:21 time:443s
fi-bdw-gvtdvm total:288 pass:264 dwarn:0 dfail:0 fail:0 skip:24 time:450s
fi-blb-e6850 total:288 pass:223 dwarn:1 dfail:0 fail:0 skip:64 time:383s
fi-bsw-n3050 total:288 pass:242 dwarn:0 dfail:0 fail:0 skip:46 time:522s
fi-bwr-2160 total:288 pass:183 dwarn:0 dfail:0 fail:0 skip:105 time:282s
fi-bxt-dsi total:288 pass:258 dwarn:0 dfail:0 fail:0 skip:30 time:506s
fi-bxt-j4205 total:288 pass:259 dwarn:0 dfail:0 fail:0 skip:29 time:512s
fi-byt-j1900 total:288 pass:253 dwarn:0 dfail:0 fail:0 skip:35 time:496s
fi-byt-n2820 total:288 pass:249 dwarn:0 dfail:0 fail:0 skip:39 time:478s
fi-elk-e7500 total:224 pass:163 dwarn:15 dfail:0 fail:0 skip:45
fi-gdg-551 total:288 pass:178 dwarn:1 dfail:0 fail:1 skip:108 time:277s
fi-glk-1 total:288 pass:260 dwarn:0 dfail:0 fail:0 skip:28 time:543s
fi-hsw-4770 total:288 pass:261 dwarn:0 dfail:0 fail:0 skip:27 time:375s
fi-hsw-4770r total:288 pass:224 dwarn:0 dfail:0 fail:0 skip:64 time:261s
fi-ilk-650 total:288 pass:228 dwarn:0 dfail:0 fail:0 skip:60 time:399s
fi-ivb-3520m total:288 pass:259 dwarn:0 dfail:0 fail:0 skip:29 time:484s
fi-ivb-3770 total:288 pass:259 dwarn:0 dfail:0 fail:0 skip:29 time:450s
fi-kbl-7500u total:288 pass:263 dwarn:1 dfail:0 fail:0 skip:24 time:488s
fi-kbl-7560u total:288 pass:269 dwarn:0 dfail:0 fail:0 skip:19 time:532s
fi-kbl-7567u total:288 pass:268 dwarn:0 dfail:0 fail:0 skip:20 time:478s
fi-kbl-r total:288 pass:261 dwarn:0 dfail:0 fail:0 skip:27 time:536s
fi-skl-6260u total:288 pass:268 dwarn:0 dfail:0 fail:0 skip:20 time:455s
fi-skl-6600u total:288 pass:261 dwarn:0 dfail:0 fail:0 skip:27 time:541s
fi-skl-6700hq total:288 pass:262 dwarn:0 dfail:0 fail:0 skip:26 time:568s
fi-skl-6700k total:288 pass:264 dwarn:0 dfail:0 fail:0 skip:24 time:524s
fi-skl-6770hq total:288 pass:268 dwarn:0 dfail:0 fail:0 skip:20 time:499s
fi-skl-gvtdvm total:288 pass:265 dwarn:0 dfail:0 fail:0 skip:23 time:450s
fi-snb-2520m total:288 pass:249 dwarn:0 dfail:0 fail:0 skip:39 time:549s
fi-snb-2600 total:288 pass:248 dwarn:0 dfail:0 fail:0 skip:40 time:421s
Blacklisted hosts:
fi-cfl-s2 total:288 pass:262 dwarn:0 dfail:0 fail:0 skip:26 time:604s
fi-cnl-y total:288 pass:262 dwarn:0 dfail:0 fail:0 skip:26 time:625s
fi-glk-dsi total:288 pass:257 dwarn:0 dfail:0 fail:1 skip:30 time:485s
== Logs ==
For more details see: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_595/
_______________________________________________
Intel-gfx mailing list
Intel-gfx@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/intel-gfx
^ permalink raw reply [flat|nested] 11+ messages in thread
* ✓ Fi.CI.IGT: success for series starting with [v2,1/2] tests/gem_exec_schedule: Add reset on failed preemption test.
2017-12-04 23:45 [PATCH i-g-t v2 1/2] tests/gem_exec_schedule: Add reset on failed preemption test Antonio Argenziano
2017-12-04 23:45 ` [PATCH i-g-t v2 2/2] tests/gem_exec_schedule: Add test for resetting preemptive batch Antonio Argenziano
2017-12-05 0:13 ` ✓ Fi.CI.BAT: success for series starting with [v2,1/2] tests/gem_exec_schedule: Add reset on failed preemption test Patchwork
@ 2017-12-05 1:08 ` Patchwork
2017-12-08 21:57 ` [PATCH i-g-t v2 1/2] " Michał Winiarski
` (2 subsequent siblings)
5 siblings, 0 replies; 11+ messages in thread
From: Patchwork @ 2017-12-05 1:08 UTC (permalink / raw)
To: Antonio Argenziano; +Cc: intel-gfx
== Series Details ==
Series: series starting with [v2,1/2] tests/gem_exec_schedule: Add reset on failed preemption test.
URL : https://patchwork.freedesktop.org/series/34874/
State : success
== Summary ==
Test kms_setmode:
Subgroup basic:
pass -> FAIL (shard-hsw) fdo#99912
Test kms_frontbuffer_tracking:
Subgroup fbc-rgb101010-draw-render:
pass -> DMESG-FAIL (shard-hsw) fdo#103167
fdo#99912 https://bugs.freedesktop.org/show_bug.cgi?id=99912
fdo#103167 https://bugs.freedesktop.org/show_bug.cgi?id=103167
shard-hsw total:2691 pass:1535 dwarn:1 dfail:1 fail:10 skip:1144 time:9519s
shard-snb total:2691 pass:1308 dwarn:1 dfail:0 fail:12 skip:1370 time:8104s
Blacklisted hosts:
shard-apl total:2691 pass:1687 dwarn:1 dfail:0 fail:22 skip:981 time:13783s
shard-kbl total:2691 pass:1807 dwarn:1 dfail:0 fail:23 skip:860 time:11053s
== Logs ==
For more details see: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_595/shards.html
_______________________________________________
Intel-gfx mailing list
Intel-gfx@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/intel-gfx
^ permalink raw reply [flat|nested] 11+ messages in thread
* Re: [PATCH i-g-t v2 1/2] tests/gem_exec_schedule: Add reset on failed preemption test.
2017-12-04 23:45 [PATCH i-g-t v2 1/2] tests/gem_exec_schedule: Add reset on failed preemption test Antonio Argenziano
` (2 preceding siblings ...)
2017-12-05 1:08 ` ✓ Fi.CI.IGT: " Patchwork
@ 2017-12-08 21:57 ` Michał Winiarski
2017-12-09 0:01 ` ✓ Fi.CI.BAT: success for series starting with [v2,1/2] tests/gem_exec_schedule: Add reset on failed preemption test. (rev2) Patchwork
2017-12-09 0:50 ` ✓ Fi.CI.IGT: " Patchwork
5 siblings, 0 replies; 11+ messages in thread
From: Michał Winiarski @ 2017-12-08 21:57 UTC (permalink / raw)
To: Antonio Argenziano; +Cc: intel-gfx
On Mon, Dec 04, 2017 at 03:45:40PM -0800, Antonio Argenziano wrote:
> This patch adds a test where a low priority batch is going to be
> declared hung while a preemption is pending. The test wants to verify
> that a 'hanging' low priority batch will not disrupt the execution of a high
> priority context and that the driver does due diligence in managing a
> reset while a preemption is pending.
>
> -v2:
> - Use igt_hang_ctx to hang the engine (Chris)
> - Enable/Process engine reset using IGT libs (Chris)
> - Create new subtest_group for the test (Chris)
>
> Cc: Chris Wilson <chris@chris-wilson.co.uk>
> Cc: Michal Winiarski <michal.winiarski@intel.com>
> Signed-off-by: Antonio Argenziano <antonio.argenziano@intel.com>
Reviewed-by: Michał Winiarski <michal.winiarski@intel.com>
-Michał
> ---
> tests/gem_exec_schedule.c | 28 +++++++++++++++++++++++++++-
> 1 file changed, 27 insertions(+), 1 deletion(-)
_______________________________________________
Intel-gfx mailing list
Intel-gfx@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/intel-gfx
^ permalink raw reply [flat|nested] 11+ messages in thread
* Re: [PATCH i-g-t v2 2/2] tests/gem_exec_schedule: Add test for resetting preemptive batch
2017-12-04 23:45 ` [PATCH i-g-t v2 2/2] tests/gem_exec_schedule: Add test for resetting preemptive batch Antonio Argenziano
@ 2017-12-08 21:58 ` Michał Winiarski
2017-12-08 22:06 ` Chris Wilson
2017-12-08 22:38 ` [PATCH i-g-t v3] " Antonio Argenziano
2 siblings, 0 replies; 11+ messages in thread
From: Michał Winiarski @ 2017-12-08 21:58 UTC (permalink / raw)
To: Antonio Argenziano; +Cc: intel-gfx
On Mon, Dec 04, 2017 at 03:45:41PM -0800, Antonio Argenziano wrote:
> This patch adds a test that will trigger a preemption of a low priority
> batch by a 'bad' batch buffer which will hang. The test aims at making
> sure that a hanging high priority batch will not disrupt the submission
> flow of low priority contexts.
>
> -v2:
> - Rename subtest (Chris)
> - Use igt_hang_ctx to hang ring (Chris)
> - Add comment on execution order checks (Chris)
>
> Cc: Chris Wilson <chris@chris-wilson.co.uk>
> Cc: Michal Winiarski <michal.winiarski@intel.com>
> Signed-off-by: Antonio Argenziano <antonio.argenziano@intel.com>
Reviewed-by: Michał Winiarski <michal.winiarski@intel.com>
> ---
> tests/gem_exec_schedule.c | 37 +++++++++++++++++++++++++++++++++++++
> 1 file changed, 37 insertions(+)
_______________________________________________
Intel-gfx mailing list
Intel-gfx@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/intel-gfx
^ permalink raw reply [flat|nested] 11+ messages in thread
* Re: [PATCH i-g-t v2 2/2] tests/gem_exec_schedule: Add test for resetting preemptive batch
2017-12-04 23:45 ` [PATCH i-g-t v2 2/2] tests/gem_exec_schedule: Add test for resetting preemptive batch Antonio Argenziano
2017-12-08 21:58 ` Michał Winiarski
@ 2017-12-08 22:06 ` Chris Wilson
2017-12-08 22:38 ` [PATCH i-g-t v3] " Antonio Argenziano
2 siblings, 0 replies; 11+ messages in thread
From: Chris Wilson @ 2017-12-08 22:06 UTC (permalink / raw)
To: Antonio Argenziano, intel-gfx
Quoting Antonio Argenziano (2017-12-04 23:45:41)
> This patch adds a test that will trigger a preemption of a low priority
> batch by a 'bad' batch buffer which will hang. The test aims at making
> sure that a hanging high priority batch will not disrupt the submission
> flow of low priority contexts.
>
> -v2:
> - Rename subtest (Chris)
> - Use igt_hang_ctx to hang ring (Chris)
> - Add comment on execution order checks (Chris)
>
> Cc: Chris Wilson <chris@chris-wilson.co.uk>
> Cc: Michal Winiarski <michal.winiarski@intel.com>
> Signed-off-by: Antonio Argenziano <antonio.argenziano@intel.com>
> ---
> +static void preemptive_hang(int fd, unsigned ring)
> +{
> + igt_spin_t *spin[16];
Someone is going to shout one day, what is it with the magic number 16?
#define MAX_ELSP_QLEN 16 ? And should be set to some safe number times
the forseeable future.
> + igt_hang_t hang;
> + uint32_t ctx[2];
> +
> + ctx[HI] = gem_context_create(fd);
> + gem_context_set_priority(fd, ctx[HI], MAX_PRIO);
> +
> + for (int n = 0; n < 16; n++) {
> + ctx[LO] = gem_context_create(fd);
> + gem_context_set_priority(fd, ctx[LO], MIN_PRIO);
> +
> + spin[n] = __igt_spin_batch_new(fd, ctx[LO], ring, 0);
> + igt_debug("spin[%d].handle=%d\n", n, spin[n]->handle);
> +
> + gem_context_destroy(fd, ctx[LO]);
> + }
> +
> + hang = igt_hang_ctx(fd, ctx[HI], ring, 0, NULL);
> + gem_wait(fd, hang.handle, NULL);
That should be igt_post_hang_ring(fd, hang);
-Chris
_______________________________________________
Intel-gfx mailing list
Intel-gfx@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/intel-gfx
^ permalink raw reply [flat|nested] 11+ messages in thread
* [PATCH i-g-t v3] tests/gem_exec_schedule: Add test for resetting preemptive batch
2017-12-04 23:45 ` [PATCH i-g-t v2 2/2] tests/gem_exec_schedule: Add test for resetting preemptive batch Antonio Argenziano
2017-12-08 21:58 ` Michał Winiarski
2017-12-08 22:06 ` Chris Wilson
@ 2017-12-08 22:38 ` Antonio Argenziano
2 siblings, 0 replies; 11+ messages in thread
From: Antonio Argenziano @ 2017-12-08 22:38 UTC (permalink / raw)
To: intel-gfx
This patch adds a test that will trigger a preemption of a low priority
batch by a 'bad' batch buffer which will hang. The test aims at making
sure that a hanging high priority batch will not disrupt the submission
flow of low priority contexts.
-v2:
- Rename subtest (Chris)
- Use igt_hang_ctx to hang ring (Chris)
- Add comment on execution order checks (Chris)
-v3:
- Use library call to consume hang (Chris)
- Use a more explicit name for array size (Chris)
Cc: Chris Wilson <chris@chris-wilson.co.uk>
Cc: Michal Winiarski <michal.winiarski@intel.com>
Signed-off-by: Antonio Argenziano <antonio.argenziano@intel.com>
Reviewed-by: Michał Winiarski <michal.winiarski@intel.com>
---
tests/gem_exec_schedule.c | 44 +++++++++++++++++++++++++++++++++++++++++---
1 file changed, 41 insertions(+), 3 deletions(-)
diff --git a/tests/gem_exec_schedule.c b/tests/gem_exec_schedule.c
index d0f85b3e..8cad15d9 100644
--- a/tests/gem_exec_schedule.c
+++ b/tests/gem_exec_schedule.c
@@ -41,6 +41,7 @@
#define MIN_PRIO LOCAL_I915_CONTEXT_MIN_USER_PRIORITY
#define BUSY_QLEN 8
+#define MAX_ELSP_QLEN 16
IGT_TEST_DESCRIPTION("Check that we can control the order of execution");
@@ -362,7 +363,7 @@ static void preempt(int fd, unsigned ring, unsigned flags)
{
uint32_t result = gem_create(fd, 4096);
uint32_t *ptr = gem_mmap__gtt(fd, result, 4096, PROT_READ);
- igt_spin_t *spin[16];
+ igt_spin_t *spin[MAX_ELSP_QLEN];
uint32_t ctx[2];
igt_hang_t hang;
@@ -408,7 +409,7 @@ static void preempt_other(int fd, unsigned ring)
{
uint32_t result = gem_create(fd, 4096);
uint32_t *ptr = gem_mmap__gtt(fd, result, 4096, PROT_READ);
- igt_spin_t *spin[16];
+ igt_spin_t *spin[MAX_ELSP_QLEN];
unsigned int other;
unsigned int n, i;
uint32_t ctx[3];
@@ -466,7 +467,7 @@ static void preempt_self(int fd, unsigned ring)
{
uint32_t result = gem_create(fd, 4096);
uint32_t *ptr = gem_mmap__gtt(fd, result, 4096, PROT_READ);
- igt_spin_t *spin[16];
+ igt_spin_t *spin[MAX_ELSP_QLEN];
unsigned int other;
unsigned int n, i;
uint32_t ctx[3];
@@ -515,6 +516,40 @@ static void preempt_self(int fd, unsigned ring)
gem_close(fd, result);
}
+static void preemptive_hang(int fd, unsigned ring)
+{
+ igt_spin_t *spin[MAX_ELSP_QLEN];
+ igt_hang_t hang;
+ uint32_t ctx[2];
+
+ ctx[HI] = gem_context_create(fd);
+ gem_context_set_priority(fd, ctx[HI], MAX_PRIO);
+
+ for (int n = 0; n < 16; n++) {
+ ctx[LO] = gem_context_create(fd);
+ gem_context_set_priority(fd, ctx[LO], MIN_PRIO);
+
+ spin[n] = __igt_spin_batch_new(fd, ctx[LO], ring, 0);
+ igt_debug("spin[%d].handle=%d\n", n, spin[n]->handle);
+
+ gem_context_destroy(fd, ctx[LO]);
+ }
+
+ hang = igt_hang_ctx(fd, ctx[HI], ring, 0, NULL);
+ igt_post_hang_ring(fd, hang);
+
+ for (int n = 0; n < 16; n++) {
+ /* Current behavior is to execute requests in order of submission.
+ * This is subject to change as the scheduler evolve. The test should
+ * be updated to reflect such changes.
+ */
+ igt_assert(gem_bo_busy(fd, spin[n]->handle));
+ igt_spin_batch_free(fd, spin[n]);
+ }
+
+ gem_context_destroy(fd, ctx[HI]);
+}
+
static void deep(int fd, unsigned ring)
{
#define XS 8
@@ -1044,6 +1079,9 @@ igt_main
preempt(fd, e->exec_id | e->flags, NEW_CTX | HANG_LP);
}
+ igt_subtest_f("preemptive-hang-%s", e->name)
+ preemptive_hang(fd, e->exec_id | e->flags);
+
igt_fixture {
igt_disallow_hang(fd, hang);
igt_fork_hang_detector(fd);
--
2.14.2
_______________________________________________
Intel-gfx mailing list
Intel-gfx@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/intel-gfx
^ permalink raw reply related [flat|nested] 11+ messages in thread
* ✓ Fi.CI.BAT: success for series starting with [v2,1/2] tests/gem_exec_schedule: Add reset on failed preemption test. (rev2)
2017-12-04 23:45 [PATCH i-g-t v2 1/2] tests/gem_exec_schedule: Add reset on failed preemption test Antonio Argenziano
` (3 preceding siblings ...)
2017-12-08 21:57 ` [PATCH i-g-t v2 1/2] " Michał Winiarski
@ 2017-12-09 0:01 ` Patchwork
2017-12-09 0:50 ` ✓ Fi.CI.IGT: " Patchwork
5 siblings, 0 replies; 11+ messages in thread
From: Patchwork @ 2017-12-09 0:01 UTC (permalink / raw)
To: Antonio Argenziano; +Cc: intel-gfx
== Series Details ==
Series: series starting with [v2,1/2] tests/gem_exec_schedule: Add reset on failed preemption test. (rev2)
URL : https://patchwork.freedesktop.org/series/34874/
State : success
== Summary ==
IGT patchset tested on top of latest successful build
37339e7171ee0bd6b45abf8cfef593ed9d8bf750 lib: Print other clients when DRM_SET_MASTER fails
with latest DRM-Tip kernel build CI_DRM_3487
06dd422e3209 drm-tip: 2017y-12m-08d-21h-06m-35s UTC integration manifest
Testlist changes:
+igt@gem_exec_schedule@preemptive-hang-blt
+igt@gem_exec_schedule@preemptive-hang-bsd
+igt@gem_exec_schedule@preemptive-hang-bsd1
+igt@gem_exec_schedule@preemptive-hang-bsd2
+igt@gem_exec_schedule@preemptive-hang-render
+igt@gem_exec_schedule@preemptive-hang-vebox
+igt@gem_exec_schedule@preempt-hang-blt
+igt@gem_exec_schedule@preempt-hang-bsd
+igt@gem_exec_schedule@preempt-hang-bsd1
+igt@gem_exec_schedule@preempt-hang-bsd2
+igt@gem_exec_schedule@preempt-hang-render
+igt@gem_exec_schedule@preempt-hang-vebox
Test debugfs_test:
Subgroup read_all_entries:
dmesg-warn -> DMESG-FAIL (fi-elk-e7500) fdo#103989
Test gem_mmap_gtt:
Subgroup basic-small-bo-tiledx:
pass -> FAIL (fi-gdg-551) fdo#102575
Test kms_pipe_crc_basic:
Subgroup suspend-read-crc-pipe-a:
dmesg-warn -> PASS (fi-kbl-r) fdo#104172
Subgroup suspend-read-crc-pipe-b:
incomplete -> PASS (fi-snb-2520m) fdo#103713
fdo#103989 https://bugs.freedesktop.org/show_bug.cgi?id=103989
fdo#102575 https://bugs.freedesktop.org/show_bug.cgi?id=102575
fdo#104172 https://bugs.freedesktop.org/show_bug.cgi?id=104172
fdo#103713 https://bugs.freedesktop.org/show_bug.cgi?id=103713
fi-bdw-5557u total:288 pass:267 dwarn:0 dfail:0 fail:0 skip:21 time:444s
fi-bdw-gvtdvm total:288 pass:264 dwarn:0 dfail:0 fail:0 skip:24 time:445s
fi-blb-e6850 total:288 pass:223 dwarn:1 dfail:0 fail:0 skip:64 time:389s
fi-bsw-n3050 total:288 pass:242 dwarn:0 dfail:0 fail:0 skip:46 time:522s
fi-bwr-2160 total:288 pass:183 dwarn:0 dfail:0 fail:0 skip:105 time:282s
fi-bxt-dsi total:288 pass:258 dwarn:0 dfail:0 fail:0 skip:30 time:512s
fi-bxt-j4205 total:288 pass:259 dwarn:0 dfail:0 fail:0 skip:29 time:506s
fi-byt-j1900 total:288 pass:253 dwarn:0 dfail:0 fail:0 skip:35 time:497s
fi-byt-n2820 total:288 pass:249 dwarn:0 dfail:0 fail:0 skip:39 time:487s
fi-elk-e7500 total:224 pass:163 dwarn:14 dfail:1 fail:0 skip:45
fi-gdg-551 total:288 pass:178 dwarn:1 dfail:0 fail:1 skip:108 time:272s
fi-hsw-4770 total:288 pass:261 dwarn:0 dfail:0 fail:0 skip:27 time:402s
fi-hsw-4770r total:288 pass:224 dwarn:0 dfail:0 fail:0 skip:64 time:261s
fi-ilk-650 total:288 pass:228 dwarn:0 dfail:0 fail:0 skip:60 time:395s
fi-ivb-3520m total:288 pass:259 dwarn:0 dfail:0 fail:0 skip:29 time:486s
fi-ivb-3770 total:288 pass:259 dwarn:0 dfail:0 fail:0 skip:29 time:455s
fi-kbl-7500u total:288 pass:263 dwarn:1 dfail:0 fail:0 skip:24 time:491s
fi-kbl-7560u total:288 pass:269 dwarn:0 dfail:0 fail:0 skip:19 time:528s
fi-kbl-7567u total:288 pass:268 dwarn:0 dfail:0 fail:0 skip:20 time:478s
fi-kbl-r total:288 pass:261 dwarn:0 dfail:0 fail:0 skip:27 time:537s
fi-pnv-d510 total:288 pass:222 dwarn:1 dfail:0 fail:0 skip:65 time:598s
fi-skl-6260u total:288 pass:268 dwarn:0 dfail:0 fail:0 skip:20 time:456s
fi-skl-6600u total:288 pass:261 dwarn:0 dfail:0 fail:0 skip:27 time:542s
fi-skl-6700hq total:288 pass:262 dwarn:0 dfail:0 fail:0 skip:26 time:566s
fi-skl-6700k total:288 pass:264 dwarn:0 dfail:0 fail:0 skip:24 time:526s
fi-skl-6770hq total:288 pass:268 dwarn:0 dfail:0 fail:0 skip:20 time:500s
fi-skl-gvtdvm total:288 pass:265 dwarn:0 dfail:0 fail:0 skip:23 time:452s
fi-snb-2520m total:288 pass:249 dwarn:0 dfail:0 fail:0 skip:39 time:552s
fi-snb-2600 total:288 pass:248 dwarn:0 dfail:0 fail:0 skip:40 time:422s
Blacklisted hosts:
fi-cfl-s2 total:288 pass:262 dwarn:0 dfail:0 fail:0 skip:26 time:616s
fi-cnl-y total:288 pass:262 dwarn:0 dfail:0 fail:0 skip:26 time:651s
fi-glk-dsi total:288 pass:258 dwarn:0 dfail:0 fail:0 skip:30 time:501s
== Logs ==
For more details see: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_637/
_______________________________________________
Intel-gfx mailing list
Intel-gfx@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/intel-gfx
^ permalink raw reply [flat|nested] 11+ messages in thread
* ✓ Fi.CI.IGT: success for series starting with [v2,1/2] tests/gem_exec_schedule: Add reset on failed preemption test. (rev2)
2017-12-04 23:45 [PATCH i-g-t v2 1/2] tests/gem_exec_schedule: Add reset on failed preemption test Antonio Argenziano
` (4 preceding siblings ...)
2017-12-09 0:01 ` ✓ Fi.CI.BAT: success for series starting with [v2,1/2] tests/gem_exec_schedule: Add reset on failed preemption test. (rev2) Patchwork
@ 2017-12-09 0:50 ` Patchwork
2017-12-10 14:32 ` Chris Wilson
5 siblings, 1 reply; 11+ messages in thread
From: Patchwork @ 2017-12-09 0:50 UTC (permalink / raw)
To: Antonio Argenziano; +Cc: intel-gfx
== Series Details ==
Series: series starting with [v2,1/2] tests/gem_exec_schedule: Add reset on failed preemption test. (rev2)
URL : https://patchwork.freedesktop.org/series/34874/
State : success
== Summary ==
Test kms_flip:
Subgroup vblank-vs-suspend-interruptible:
pass -> INCOMPLETE (shard-hsw) fdo#100368
Test kms_frontbuffer_tracking:
Subgroup fbc-1p-offscren-pri-shrfb-draw-blt:
pass -> FAIL (shard-snb) fdo#101623 +1
Test gem_tiled_swapping:
Subgroup non-threaded:
incomplete -> PASS (shard-snb) fdo#104009
Test drv_selftest:
Subgroup live_hangcheck:
incomplete -> PASS (shard-snb) fdo#103880
fdo#100368 https://bugs.freedesktop.org/show_bug.cgi?id=100368
fdo#101623 https://bugs.freedesktop.org/show_bug.cgi?id=101623
fdo#104009 https://bugs.freedesktop.org/show_bug.cgi?id=104009
fdo#103880 https://bugs.freedesktop.org/show_bug.cgi?id=103880
shard-hsw total:2653 pass:1509 dwarn:1 dfail:0 fail:10 skip:1132 time:9157s
shard-snb total:2692 pass:1309 dwarn:1 dfail:0 fail:12 skip:1370 time:8145s
Blacklisted hosts:
shard-apl total:2692 pass:1687 dwarn:1 dfail:0 fail:23 skip:981 time:13906s
shard-kbl total:2692 pass:1811 dwarn:1 dfail:0 fail:23 skip:857 time:11178s
== Logs ==
For more details see: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_637/shards.html
_______________________________________________
Intel-gfx mailing list
Intel-gfx@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/intel-gfx
^ permalink raw reply [flat|nested] 11+ messages in thread
* Re: ✓ Fi.CI.IGT: success for series starting with [v2,1/2] tests/gem_exec_schedule: Add reset on failed preemption test. (rev2)
2017-12-09 0:50 ` ✓ Fi.CI.IGT: " Patchwork
@ 2017-12-10 14:32 ` Chris Wilson
0 siblings, 0 replies; 11+ messages in thread
From: Chris Wilson @ 2017-12-10 14:32 UTC (permalink / raw)
To: Patchwork, Antonio Argenziano; +Cc: intel-gfx
Quoting Patchwork (2017-12-09 00:50:11)
> == Series Details ==
>
> Series: series starting with [v2,1/2] tests/gem_exec_schedule: Add reset on failed preemption test. (rev2)
> URL : https://patchwork.freedesktop.org/series/34874/
> State : success
>
> == Summary ==
>
> Test kms_flip:
> Subgroup vblank-vs-suspend-interruptible:
> pass -> INCOMPLETE (shard-hsw) fdo#100368
> Test kms_frontbuffer_tracking:
> Subgroup fbc-1p-offscren-pri-shrfb-draw-blt:
> pass -> FAIL (shard-snb) fdo#101623 +1
> Test gem_tiled_swapping:
> Subgroup non-threaded:
> incomplete -> PASS (shard-snb) fdo#104009
> Test drv_selftest:
> Subgroup live_hangcheck:
> incomplete -> PASS (shard-snb) fdo#103880
And pushed.
-Chris
_______________________________________________
Intel-gfx mailing list
Intel-gfx@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/intel-gfx
^ permalink raw reply [flat|nested] 11+ messages in thread
end of thread, other threads:[~2017-12-10 14:32 UTC | newest]
Thread overview: 11+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2017-12-04 23:45 [PATCH i-g-t v2 1/2] tests/gem_exec_schedule: Add reset on failed preemption test Antonio Argenziano
2017-12-04 23:45 ` [PATCH i-g-t v2 2/2] tests/gem_exec_schedule: Add test for resetting preemptive batch Antonio Argenziano
2017-12-08 21:58 ` Michał Winiarski
2017-12-08 22:06 ` Chris Wilson
2017-12-08 22:38 ` [PATCH i-g-t v3] " Antonio Argenziano
2017-12-05 0:13 ` ✓ Fi.CI.BAT: success for series starting with [v2,1/2] tests/gem_exec_schedule: Add reset on failed preemption test Patchwork
2017-12-05 1:08 ` ✓ Fi.CI.IGT: " Patchwork
2017-12-08 21:57 ` [PATCH i-g-t v2 1/2] " Michał Winiarski
2017-12-09 0:01 ` ✓ Fi.CI.BAT: success for series starting with [v2,1/2] tests/gem_exec_schedule: Add reset on failed preemption test. (rev2) Patchwork
2017-12-09 0:50 ` ✓ Fi.CI.IGT: " Patchwork
2017-12-10 14:32 ` Chris Wilson
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.