* [PATCH igt] igt/gem_exec_schedule: Detect too slow setup in deep-*
@ 2017-09-28 11:20 Chris Wilson
2017-09-28 12:04 ` ✓ Fi.CI.BAT: success for " Patchwork
` (2 more replies)
0 siblings, 3 replies; 5+ messages in thread
From: Chris Wilson @ 2017-09-28 11:20 UTC (permalink / raw)
To: intel-gfx
Using vgem as our cork for building the request queue limits us to 10s
of setup (or else the fence autoexpires and we start executing too
early). Add timeouts to the setup loops and SKIP if we cannot establish
the workload within 10s, the machine and driver is too slow to evaluate
the expected results.
To avoid the artificial limit of 10s requires lifting the dependency on
vgem and switching to sw_sync and explicit fencing. Just a matter of
plumbing!
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
---
tests/gem_exec_schedule.c | 37 +++++++++++++++++++++++++++++++++----
1 file changed, 33 insertions(+), 4 deletions(-)
diff --git a/tests/gem_exec_schedule.c b/tests/gem_exec_schedule.c
index ec0fd9ef..961dc9e2 100644
--- a/tests/gem_exec_schedule.c
+++ b/tests/gem_exec_schedule.c
@@ -466,10 +466,12 @@ static void preempt_self(int fd, unsigned ring)
static void deep(int fd, unsigned ring)
{
#define XS 8
- const unsigned int nctx = MAX_PRIO + 1;
+ const unsigned int nctx = MAX_PRIO - MIN_PRIO;
const unsigned size = ALIGN(4*nctx, 4096);
+ struct timespec tv = {};
struct cork cork;
uint32_t result, dep[XS];
+ uint32_t expected = 0;
uint32_t *ptr;
uint32_t *ctx;
@@ -483,21 +485,48 @@ static void deep(int fd, unsigned ring)
for (int m = 0; m < XS; m ++)
dep[m] = gem_create(fd, size);
+ /* Bind the surfaces into each of the contexts */
+ {
+ struct drm_i915_gem_exec_object2 obj[XS + 2];
+ struct drm_i915_gem_execbuffer2 execbuf;
+ const uint32_t bbe = MI_BATCH_BUFFER_END;
+
+ memset(obj, 0, sizeof(obj));
+ for (int n = 0; n < XS; n++)
+ obj[n].handle = dep[n];
+ obj[XS].handle = result;
+ obj[XS+1].handle = gem_create(fd, 4096);
+ gem_write(fd, obj[XS+1].handle, 0, &bbe, sizeof(bbe));
+
+ memset(&execbuf, 0, sizeof(execbuf));
+ execbuf.buffers_ptr = to_user_pointer(obj);
+ execbuf.buffer_count = XS + 2;
+ execbuf.flags = ring;
+ for (int n = 0; n < nctx; n++) {
+ execbuf.rsvd1 = ctx[n];
+ gem_execbuf(fd, &execbuf);
+ }
+ gem_close(fd, obj[XS+1].handle);
+ gem_sync(fd, result);
+ }
+
plug(fd, &cork);
/* Create a deep dependency chain, with a few branches */
- for (int n = 0; n < nctx; n++)
+ for (int n = 0; n < nctx && igt_seconds_elapsed(&tv) < 8; n++)
for (int m = 0; m < XS; m++)
store_dword(fd, ctx[n], ring, dep[m], 4*n, ctx[n], cork.handle, I915_GEM_DOMAIN_INSTRUCTION);
- for (int n = 0; n < nctx; n++) {
+ for (int n = 0; n < nctx && igt_seconds_elapsed(&tv) < 6; n++) {
for (int m = 0; m < XS; m++) {
store_dword(fd, ctx[n], ring, result, 4*n, ctx[n], dep[m], 0);
store_dword(fd, ctx[n], ring, result, 4*m, ctx[n], 0, I915_GEM_DOMAIN_INSTRUCTION);
}
+ expected = ctx[n];
}
unplug_show_queue(fd, &cork, ring);
+ igt_require(expected); /* too slow */
for (int n = 0; n < nctx; n++)
gem_context_destroy(fd, ctx[n]);
@@ -520,7 +549,7 @@ static void deep(int fd, unsigned ring)
/* No reordering due to PI on all contexts because of the common dep */
for (int m = 0; m < XS; m++)
- igt_assert_eq_u32(ptr[m], ctx[nctx - 1]);
+ igt_assert_eq_u32(ptr[m], expected);
munmap(ptr, size);
free(ctx);
--
2.14.1
_______________________________________________
Intel-gfx mailing list
Intel-gfx@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/intel-gfx
^ permalink raw reply related [flat|nested] 5+ messages in thread
* ✓ Fi.CI.BAT: success for igt/gem_exec_schedule: Detect too slow setup in deep-*
2017-09-28 11:20 [PATCH igt] igt/gem_exec_schedule: Detect too slow setup in deep-* Chris Wilson
@ 2017-09-28 12:04 ` Patchwork
2017-09-28 13:21 ` ✓ Fi.CI.IGT: " Patchwork
2017-09-29 8:48 ` [PATCH igt] " Joonas Lahtinen
2 siblings, 0 replies; 5+ messages in thread
From: Patchwork @ 2017-09-28 12:04 UTC (permalink / raw)
To: Chris Wilson; +Cc: intel-gfx
== Series Details ==
Series: igt/gem_exec_schedule: Detect too slow setup in deep-*
URL : https://patchwork.freedesktop.org/series/31061/
State : success
== Summary ==
IGT patchset tested on top of latest successful build
2885b10f99b4beeb046e75af8b8488c229f629d3 igt/gem_exec_schedule: Ignore set-priority failures on old kernels
with latest DRM-Tip kernel build CI_DRM_3148
c1ed50121778 drm-tip: 2017y-09m-28d-04h-52m-47s UTC integration manifest
fi-bdw-5557u total:289 pass:268 dwarn:0 dfail:0 fail:0 skip:21 time:445s
fi-bdw-gvtdvm total:289 pass:265 dwarn:0 dfail:0 fail:0 skip:24 time:480s
fi-blb-e6850 total:289 pass:224 dwarn:1 dfail:0 fail:0 skip:64 time:423s
fi-bsw-n3050 total:289 pass:243 dwarn:0 dfail:0 fail:0 skip:46 time:522s
fi-bwr-2160 total:289 pass:184 dwarn:0 dfail:0 fail:0 skip:105 time:281s
fi-bxt-dsi total:289 pass:259 dwarn:0 dfail:0 fail:0 skip:30 time:502s
fi-bxt-j4205 total:289 pass:260 dwarn:0 dfail:0 fail:0 skip:29 time:508s
fi-byt-j1900 total:289 pass:254 dwarn:1 dfail:0 fail:0 skip:34 time:499s
fi-cfl-s total:289 pass:256 dwarn:1 dfail:0 fail:0 skip:32 time:560s
fi-cnl-y total:289 pass:258 dwarn:0 dfail:0 fail:4 skip:27 time:660s
fi-elk-e7500 total:289 pass:230 dwarn:0 dfail:0 fail:0 skip:59 time:423s
fi-glk-1 total:289 pass:260 dwarn:0 dfail:0 fail:0 skip:29 time:567s
fi-hsw-4770 total:289 pass:263 dwarn:0 dfail:0 fail:0 skip:26 time:425s
fi-hsw-4770r total:289 pass:263 dwarn:0 dfail:0 fail:0 skip:26 time:402s
fi-ilk-650 total:289 pass:229 dwarn:0 dfail:0 fail:0 skip:60 time:435s
fi-ivb-3520m total:289 pass:261 dwarn:0 dfail:0 fail:0 skip:28 time:493s
fi-ivb-3770 total:289 pass:261 dwarn:0 dfail:0 fail:0 skip:28 time:466s
fi-kbl-7500u total:289 pass:264 dwarn:1 dfail:0 fail:0 skip:24 time:472s
fi-kbl-7560u total:289 pass:270 dwarn:0 dfail:0 fail:0 skip:19 time:580s
fi-kbl-r total:289 pass:262 dwarn:0 dfail:0 fail:0 skip:27 time:591s
fi-pnv-d510 total:289 pass:223 dwarn:1 dfail:0 fail:0 skip:65 time:545s
fi-skl-6260u total:289 pass:269 dwarn:0 dfail:0 fail:0 skip:20 time:454s
fi-skl-6700k total:289 pass:264 dwarn:1 dfail:0 fail:0 skip:24 time:750s
fi-skl-6770hq total:289 pass:269 dwarn:0 dfail:0 fail:0 skip:20 time:492s
fi-skl-gvtdvm total:289 pass:266 dwarn:0 dfail:0 fail:0 skip:23 time:473s
fi-snb-2520m total:289 pass:251 dwarn:0 dfail:0 fail:0 skip:38 time:570s
fi-snb-2600 total:289 pass:250 dwarn:0 dfail:0 fail:0 skip:39 time:419s
== Logs ==
For more details see: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_266/
_______________________________________________
Intel-gfx mailing list
Intel-gfx@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/intel-gfx
^ permalink raw reply [flat|nested] 5+ messages in thread
* ✓ Fi.CI.IGT: success for igt/gem_exec_schedule: Detect too slow setup in deep-*
2017-09-28 11:20 [PATCH igt] igt/gem_exec_schedule: Detect too slow setup in deep-* Chris Wilson
2017-09-28 12:04 ` ✓ Fi.CI.BAT: success for " Patchwork
@ 2017-09-28 13:21 ` Patchwork
2017-09-29 8:48 ` [PATCH igt] " Joonas Lahtinen
2 siblings, 0 replies; 5+ messages in thread
From: Patchwork @ 2017-09-28 13:21 UTC (permalink / raw)
To: Chris Wilson; +Cc: intel-gfx
== Series Details ==
Series: igt/gem_exec_schedule: Detect too slow setup in deep-*
URL : https://patchwork.freedesktop.org/series/31061/
State : success
== Summary ==
Test gem_eio:
Subgroup in-flight:
pass -> DMESG-WARN (shard-hsw) fdo#102886 +2
Test gem_exec_reloc:
Subgroup basic-write-read-noreloc:
incomplete -> PASS (shard-hsw) fdo#102332
Test kms_flip:
Subgroup plain-flip-fb-recreate:
pass -> FAIL (shard-hsw) fdo#102504
Subgroup wf_vblank-vs-modeset:
pass -> DMESG-WARN (shard-hsw) fdo#102614
Test perf:
Subgroup blocking:
pass -> FAIL (shard-hsw) fdo#102252
Test kms_cursor_legacy:
Subgroup cursorA-vs-flipA-atomic-transitions:
fail -> PASS (shard-hsw) fdo#102723
Test kms_setmode:
Subgroup basic:
pass -> FAIL (shard-hsw) fdo#99912
Test kms_atomic_transition:
Subgroup plane-all-transition-nonblocking:
pass -> FAIL (shard-hsw) fdo#102671
fdo#102886 https://bugs.freedesktop.org/show_bug.cgi?id=102886
fdo#102332 https://bugs.freedesktop.org/show_bug.cgi?id=102332
fdo#102504 https://bugs.freedesktop.org/show_bug.cgi?id=102504
fdo#102614 https://bugs.freedesktop.org/show_bug.cgi?id=102614
fdo#102252 https://bugs.freedesktop.org/show_bug.cgi?id=102252
fdo#102723 https://bugs.freedesktop.org/show_bug.cgi?id=102723
fdo#99912 https://bugs.freedesktop.org/show_bug.cgi?id=99912
fdo#102671 https://bugs.freedesktop.org/show_bug.cgi?id=102671
shard-hsw total:2429 pass:1327 dwarn:6 dfail:0 fail:13 skip:1083 time:9894s
== Logs ==
For more details see: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_266/shards.html
_______________________________________________
Intel-gfx mailing list
Intel-gfx@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/intel-gfx
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: [PATCH igt] igt/gem_exec_schedule: Detect too slow setup in deep-*
2017-09-28 11:20 [PATCH igt] igt/gem_exec_schedule: Detect too slow setup in deep-* Chris Wilson
2017-09-28 12:04 ` ✓ Fi.CI.BAT: success for " Patchwork
2017-09-28 13:21 ` ✓ Fi.CI.IGT: " Patchwork
@ 2017-09-29 8:48 ` Joonas Lahtinen
2017-09-29 9:03 ` Chris Wilson
2 siblings, 1 reply; 5+ messages in thread
From: Joonas Lahtinen @ 2017-09-29 8:48 UTC (permalink / raw)
To: Chris Wilson, intel-gfx
On Thu, 2017-09-28 at 12:20 +0100, Chris Wilson wrote:
> Using vgem as our cork for building the request queue limits us to 10s
> of setup (or else the fence autoexpires and we start executing too
> early). Add timeouts to the setup loops and SKIP if we cannot establish
> the workload within 10s, the machine and driver is too slow to evaluate
> the expected results.
>
> To avoid the artificial limit of 10s requires lifting the dependency on
> vgem and switching to sw_sync and explicit fencing. Just a matter of
> plumbing!
>
> Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
<SNIP>
> @@ -483,21 +485,48 @@ static void deep(int fd, unsigned ring)
> for (int m = 0; m < XS; m ++)
> dep[m] = gem_create(fd, size);
>
> + /* Bind the surfaces into each of the contexts */
"before starting timeout measurement."
Reviewed-by: Joonas Lahtinen <joonas.lahtinen@linux.intel.com>
Regards, Joonas
--
Joonas Lahtinen
Open Source Technology Center
Intel Corporation
_______________________________________________
Intel-gfx mailing list
Intel-gfx@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/intel-gfx
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: [PATCH igt] igt/gem_exec_schedule: Detect too slow setup in deep-*
2017-09-29 8:48 ` [PATCH igt] " Joonas Lahtinen
@ 2017-09-29 9:03 ` Chris Wilson
0 siblings, 0 replies; 5+ messages in thread
From: Chris Wilson @ 2017-09-29 9:03 UTC (permalink / raw)
To: Joonas Lahtinen, intel-gfx
Quoting Joonas Lahtinen (2017-09-29 09:48:42)
> On Thu, 2017-09-28 at 12:20 +0100, Chris Wilson wrote:
> > Using vgem as our cork for building the request queue limits us to 10s
> > of setup (or else the fence autoexpires and we start executing too
> > early). Add timeouts to the setup loops and SKIP if we cannot establish
> > the workload within 10s, the machine and driver is too slow to evaluate
> > the expected results.
> >
> > To avoid the artificial limit of 10s requires lifting the dependency on
> > vgem and switching to sw_sync and explicit fencing. Just a matter of
> > plumbing!
> >
> > Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
>
> <SNIP>
>
> > @@ -483,21 +485,48 @@ static void deep(int fd, unsigned ring)
> > for (int m = 0; m < XS; m ++)
> > dep[m] = gem_create(fd, size);
> >
> > + /* Bind the surfaces into each of the contexts */
>
> "before starting timeout measurement."
Too long, can you get rid of about 20 characters?
I took it as read that you could see that it was before starting the
timeout.
-Chris
_______________________________________________
Intel-gfx mailing list
Intel-gfx@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/intel-gfx
^ permalink raw reply [flat|nested] 5+ messages in thread
end of thread, other threads:[~2017-09-29 9:03 UTC | newest]
Thread overview: 5+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2017-09-28 11:20 [PATCH igt] igt/gem_exec_schedule: Detect too slow setup in deep-* Chris Wilson
2017-09-28 12:04 ` ✓ Fi.CI.BAT: success for " Patchwork
2017-09-28 13:21 ` ✓ Fi.CI.IGT: " Patchwork
2017-09-29 8:48 ` [PATCH igt] " Joonas Lahtinen
2017-09-29 9:03 ` 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.