* [PATCH igt] igt/gem_exec_schedule: Ignore set-priority failures on old kernels
@ 2017-09-25 20:21 Chris Wilson
2017-09-25 20:46 ` ✓ Fi.CI.BAT: success for igt/gem_exec_schedule: Ignore set-priority failures on old kernels (rev2) Patchwork
` (2 more replies)
0 siblings, 3 replies; 5+ messages in thread
From: Chris Wilson @ 2017-09-25 20:21 UTC (permalink / raw)
To: intel-gfx
When plugging the device, we need to submit batches at highest priority
so that they cannot be gazumped by the queued requests. On older kernels
that do not support the user changing context priority, all contexts
therefore have max priority and we can ignore the error.
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
---
tests/gem_exec_schedule.c | 39 +++++++++++++++++++--------------------
1 file changed, 19 insertions(+), 20 deletions(-)
diff --git a/tests/gem_exec_schedule.c b/tests/gem_exec_schedule.c
index e9b928f1..0b1925f1 100644
--- a/tests/gem_exec_schedule.c
+++ b/tests/gem_exec_schedule.c
@@ -152,33 +152,32 @@ static void unplug(struct cork *c)
close(c->device);
}
+static uint32_t create_highest_priority(int fd)
+{
+ uint32_t ctx = gem_context_create(fd);
+
+ /* If no priority support, all contexts have equal and max priority */
+ __ctx_set_priority(fd, ctx, MAX_PRIO);
+
+ return ctx;
+}
+
static void unplug_show_queue(int fd, struct cork *c, unsigned int engine)
{
- igt_spin_t *spin;
- uint32_t ctx;
-
- ctx = gem_context_create(fd);
- ctx_set_priority(fd, ctx, MAX_PRIO);
-
- spin = igt_spin_batch_new(fd, ctx, engine, 0);
- for (int n = 0; n < BUSY_QLEN; n++) {
- struct drm_i915_gem_exec_object2 obj = {
- .handle = spin->handle,
- };
- struct drm_i915_gem_execbuffer2 execbuf = {
- .buffers_ptr = to_user_pointer(&obj),
- .buffer_count = 1,
- .flags = engine,
- };
- gem_execbuf(fd, &execbuf);
+ igt_spin_t *spin[BUSY_QLEN];
+
+ for (int n = 0; n < ARRAY_SIZE(spin); n++) {
+ uint32_t ctx = create_highest_priority(fd);
+ spin[n] = igt_spin_batch_new(fd, ctx, engine, 0);
+ gem_context_destroy(fd, ctx);
}
unplug(c); /* batches will now be queued on the engine */
-
igt_debugfs_dump(fd, "i915_engine_info");
- igt_spin_batch_free(fd, spin);
- gem_context_destroy(fd, ctx);
+ for (int n = 0; n < ARRAY_SIZE(spin); n++)
+ igt_spin_batch_free(fd, spin[n]);
+
}
static void fifo(int fd, unsigned ring)
--
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: Ignore set-priority failures on old kernels (rev2)
2017-09-25 20:21 [PATCH igt] igt/gem_exec_schedule: Ignore set-priority failures on old kernels Chris Wilson
@ 2017-09-25 20:46 ` Patchwork
2017-09-26 1:50 ` ✓ Fi.CI.IGT: " Patchwork
2017-09-26 14:11 ` [PATCH igt] igt/gem_exec_schedule: Ignore set-priority failures on old kernels Michał Winiarski
2 siblings, 0 replies; 5+ messages in thread
From: Patchwork @ 2017-09-25 20:46 UTC (permalink / raw)
To: Chris Wilson; +Cc: intel-gfx
== Series Details ==
Series: igt/gem_exec_schedule: Ignore set-priority failures on old kernels (rev2)
URL : https://patchwork.freedesktop.org/series/30855/
State : success
== Summary ==
IGT patchset tested on top of latest successful build
c117213c06d0f47937c1f225ebead5e1fe8c7a0e igt/gem_exec_whisper: Smoketest context priorities
with latest DRM-Tip kernel build CI_DRM_3131
f4eb3c100b0b drm-tip: 2017y-09m-25d-19h-36m-33s UTC integration manifest
Test kms_pipe_crc_basic:
Subgroup suspend-read-crc-pipe-c:
incomplete -> PASS (fi-kbl-r)
Test drv_module_reload:
Subgroup basic-no-display:
pass -> DMESG-WARN (fi-glk-1) fdo#102777 +1
fdo#102777 https://bugs.freedesktop.org/show_bug.cgi?id=102777
fi-bdw-5557u total:289 pass:268 dwarn:0 dfail:0 fail:0 skip:21 time:447s
fi-bdw-gvtdvm total:289 pass:265 dwarn:0 dfail:0 fail:0 skip:24 time:472s
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:521s
fi-bwr-2160 total:289 pass:184 dwarn:0 dfail:0 fail:0 skip:105 time:278s
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:496s
fi-byt-n2820 total:289 pass:250 dwarn:1 dfail:0 fail:0 skip:38 time:495s
fi-cfl-s total:289 pass:223 dwarn:34 dfail:0 fail:0 skip:32 time:552s
fi-cnl-y total:289 pass:257 dwarn:0 dfail:0 fail:5 skip:27 time:664s
fi-elk-e7500 total:289 pass:230 dwarn:0 dfail:0 fail:0 skip:59 time:423s
fi-glk-1 total:289 pass:259 dwarn:1 dfail:0 fail:0 skip:29 time:568s
fi-hsw-4770 total:289 pass:263 dwarn:0 dfail:0 fail:0 skip:26 time:427s
fi-hsw-4770r total:289 pass:263 dwarn:0 dfail:0 fail:0 skip:26 time:407s
fi-ilk-650 total:289 pass:229 dwarn:0 dfail:0 fail:0 skip:60 time:437s
fi-ivb-3520m total:289 pass:261 dwarn:0 dfail:0 fail:0 skip:28 time:496s
fi-ivb-3770 total:289 pass:261 dwarn:0 dfail:0 fail:0 skip:28 time:471s
fi-kbl-7500u total:289 pass:264 dwarn:1 dfail:0 fail:0 skip:24 time:474s
fi-kbl-7560u total:289 pass:270 dwarn:0 dfail:0 fail:0 skip:19 time:571s
fi-kbl-r total:289 pass:262 dwarn:0 dfail:0 fail:0 skip:27 time:593s
fi-pnv-d510 total:289 pass:223 dwarn:1 dfail:0 fail:0 skip:65 time:543s
fi-skl-6260u total:289 pass:269 dwarn:0 dfail:0 fail:0 skip:20 time:454s
fi-skl-6700k total:289 pass:265 dwarn:0 dfail:0 fail:0 skip:24 time:751s
fi-skl-6770hq total:289 pass:269 dwarn:0 dfail:0 fail:0 skip:20 time:491s
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:563s
fi-snb-2600 total:289 pass:250 dwarn:0 dfail:0 fail:0 skip:39 time:417s
== Logs ==
For more details see: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_249/
_______________________________________________
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: Ignore set-priority failures on old kernels (rev2)
2017-09-25 20:21 [PATCH igt] igt/gem_exec_schedule: Ignore set-priority failures on old kernels Chris Wilson
2017-09-25 20:46 ` ✓ Fi.CI.BAT: success for igt/gem_exec_schedule: Ignore set-priority failures on old kernels (rev2) Patchwork
@ 2017-09-26 1:50 ` Patchwork
2017-09-26 14:11 ` [PATCH igt] igt/gem_exec_schedule: Ignore set-priority failures on old kernels Michał Winiarski
2 siblings, 0 replies; 5+ messages in thread
From: Patchwork @ 2017-09-26 1:50 UTC (permalink / raw)
To: Chris Wilson; +Cc: intel-gfx
== Series Details ==
Series: igt/gem_exec_schedule: Ignore set-priority failures on old kernels (rev2)
URL : https://patchwork.freedesktop.org/series/30855/
State : success
== Summary ==
Test gem_exec_schedule:
Subgroup fifo-render:
fail -> PASS (shard-hsw)
Subgroup fifo-blt:
fail -> PASS (shard-hsw)
Subgroup fifo-vebox:
fail -> PASS (shard-hsw)
Subgroup fifo-bsd:
fail -> PASS (shard-hsw)
Test prime_mmap:
Subgroup test_userptr:
dmesg-warn -> PASS (shard-hsw) fdo#102939
Test perf:
Subgroup polling:
pass -> FAIL (shard-hsw) fdo#102252
Test gem_eio:
Subgroup in-flight:
pass -> DMESG-WARN (shard-hsw) fdo#102886 +2
Test prime_self_import:
Subgroup reimport-vs-gem_close-race:
fail -> PASS (shard-hsw) fdo#102655
fdo#102939 https://bugs.freedesktop.org/show_bug.cgi?id=102939
fdo#102252 https://bugs.freedesktop.org/show_bug.cgi?id=102252
fdo#102886 https://bugs.freedesktop.org/show_bug.cgi?id=102886
fdo#102655 https://bugs.freedesktop.org/show_bug.cgi?id=102655
shard-hsw total:2429 pass:1328 dwarn:5 dfail:0 fail:13 skip:1083 time:9856s
== Logs ==
For more details see: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_249/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: Ignore set-priority failures on old kernels
2017-09-25 20:21 [PATCH igt] igt/gem_exec_schedule: Ignore set-priority failures on old kernels Chris Wilson
2017-09-25 20:46 ` ✓ Fi.CI.BAT: success for igt/gem_exec_schedule: Ignore set-priority failures on old kernels (rev2) Patchwork
2017-09-26 1:50 ` ✓ Fi.CI.IGT: " Patchwork
@ 2017-09-26 14:11 ` Michał Winiarski
2017-09-26 14:20 ` Chris Wilson
2 siblings, 1 reply; 5+ messages in thread
From: Michał Winiarski @ 2017-09-26 14:11 UTC (permalink / raw)
To: Chris Wilson; +Cc: intel-gfx
On Mon, Sep 25, 2017 at 09:21:15PM +0100, Chris Wilson wrote:
> When plugging the device, we need to submit batches at highest priority
> so that they cannot be gazumped by the queued requests. On older kernels
> that do not support the user changing context priority, all contexts
> therefore have max priority and we can ignore the error.
All context have equal priority, we can ignore the error, it's not MAX.
>
> Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
> ---
> tests/gem_exec_schedule.c | 39 +++++++++++++++++++--------------------
> 1 file changed, 19 insertions(+), 20 deletions(-)
>
> diff --git a/tests/gem_exec_schedule.c b/tests/gem_exec_schedule.c
> index e9b928f1..0b1925f1 100644
> --- a/tests/gem_exec_schedule.c
> +++ b/tests/gem_exec_schedule.c
> @@ -152,33 +152,32 @@ static void unplug(struct cork *c)
> close(c->device);
> }
>
> +static uint32_t create_highest_priority(int fd)
> +{
> + uint32_t ctx = gem_context_create(fd);
> +
> + /* If no priority support, all contexts have equal and max priority */
Same here. It's DEFAULT (0), not MAX. We still do PI for display AFAICS.
That's just to handle fifo test even if we don't have userspace control, right?
Reviewed-by: Michał Winiarski <michal.winiarski@intel.com>
-Michał
> + __ctx_set_priority(fd, ctx, MAX_PRIO);
> +
> + return ctx;
> +}
> +
> static void unplug_show_queue(int fd, struct cork *c, unsigned int engine)
> {
> - igt_spin_t *spin;
> - uint32_t ctx;
> -
> - ctx = gem_context_create(fd);
> - ctx_set_priority(fd, ctx, MAX_PRIO);
> -
> - spin = igt_spin_batch_new(fd, ctx, engine, 0);
> - for (int n = 0; n < BUSY_QLEN; n++) {
> - struct drm_i915_gem_exec_object2 obj = {
> - .handle = spin->handle,
> - };
> - struct drm_i915_gem_execbuffer2 execbuf = {
> - .buffers_ptr = to_user_pointer(&obj),
> - .buffer_count = 1,
> - .flags = engine,
> - };
> - gem_execbuf(fd, &execbuf);
> + igt_spin_t *spin[BUSY_QLEN];
> +
> + for (int n = 0; n < ARRAY_SIZE(spin); n++) {
> + uint32_t ctx = create_highest_priority(fd);
> + spin[n] = igt_spin_batch_new(fd, ctx, engine, 0);
> + gem_context_destroy(fd, ctx);
> }
>
> unplug(c); /* batches will now be queued on the engine */
> -
> igt_debugfs_dump(fd, "i915_engine_info");
> - igt_spin_batch_free(fd, spin);
>
> - gem_context_destroy(fd, ctx);
> + for (int n = 0; n < ARRAY_SIZE(spin); n++)
> + igt_spin_batch_free(fd, spin[n]);
> +
> }
>
> static void fifo(int fd, unsigned ring)
> --
> 2.14.1
>
> _______________________________________________
> Intel-gfx mailing list
> Intel-gfx@lists.freedesktop.org
> https://lists.freedesktop.org/mailman/listinfo/intel-gfx
_______________________________________________
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: Ignore set-priority failures on old kernels
2017-09-26 14:11 ` [PATCH igt] igt/gem_exec_schedule: Ignore set-priority failures on old kernels Michał Winiarski
@ 2017-09-26 14:20 ` Chris Wilson
0 siblings, 0 replies; 5+ messages in thread
From: Chris Wilson @ 2017-09-26 14:20 UTC (permalink / raw)
To: Michał Winiarski; +Cc: intel-gfx
Quoting Michał Winiarski (2017-09-26 15:11:15)
> On Mon, Sep 25, 2017 at 09:21:15PM +0100, Chris Wilson wrote:
> > When plugging the device, we need to submit batches at highest priority
> > so that they cannot be gazumped by the queued requests. On older kernels
> > that do not support the user changing context priority, all contexts
> > therefore have max priority and we can ignore the error.
>
> All context have equal priority, we can ignore the error, it's not MAX.
>
> >
> > Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
> > ---
> > tests/gem_exec_schedule.c | 39 +++++++++++++++++++--------------------
> > 1 file changed, 19 insertions(+), 20 deletions(-)
> >
> > diff --git a/tests/gem_exec_schedule.c b/tests/gem_exec_schedule.c
> > index e9b928f1..0b1925f1 100644
> > --- a/tests/gem_exec_schedule.c
> > +++ b/tests/gem_exec_schedule.c
> > @@ -152,33 +152,32 @@ static void unplug(struct cork *c)
> > close(c->device);
> > }
> >
> > +static uint32_t create_highest_priority(int fd)
> > +{
> > + uint32_t ctx = gem_context_create(fd);
> > +
> > + /* If no priority support, all contexts have equal and max priority */
>
> Same here. It's DEFAULT (0), not MAX. We still do PI for display AFAICS.
Ssh. From the user perspective, one priority rules them all, I was
trying to emphasize that we could not submit a higher priority context
ourselves that would escape the plug. Hence the language focusing around
this being the maximum priority that we would see.
> That's just to handle fifo test even if we don't have userspace control, right?
Right. Just the test that doesn't depend upon context priorities as it
is checking that equal priority requests submitted in order are executed
in order. Hmm, could do with that being fifo at different priorities
just in case we happen to treat default as a special case.
-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-26 14:20 UTC | newest]
Thread overview: 5+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2017-09-25 20:21 [PATCH igt] igt/gem_exec_schedule: Ignore set-priority failures on old kernels Chris Wilson
2017-09-25 20:46 ` ✓ Fi.CI.BAT: success for igt/gem_exec_schedule: Ignore set-priority failures on old kernels (rev2) Patchwork
2017-09-26 1:50 ` ✓ Fi.CI.IGT: " Patchwork
2017-09-26 14:11 ` [PATCH igt] igt/gem_exec_schedule: Ignore set-priority failures on old kernels Michał Winiarski
2017-09-26 14:20 ` Chris Wilson
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox