* [Intel-gfx] [PATCH i-g-t] i915/gem_ctx_exec: Exploit resource contention to verify execbuf independence
@ 2020-05-04 19:31 ` Chris Wilson
0 siblings, 0 replies; 6+ messages in thread
From: Chris Wilson @ 2020-05-04 19:31 UTC (permalink / raw)
To: intel-gfx; +Cc: igt-dev, Chris Wilson
Even if one client is blocked on a resource, that should not impact
another client.
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
---
tests/i915/gem_ctx_exec.c | 122 +++++++++++++++++++++++++++++++++++++-
1 file changed, 121 insertions(+), 1 deletion(-)
diff --git a/tests/i915/gem_ctx_exec.c b/tests/i915/gem_ctx_exec.c
index ad2f9e545..d7cd56424 100644
--- a/tests/i915/gem_ctx_exec.c
+++ b/tests/i915/gem_ctx_exec.c
@@ -35,8 +35,9 @@
#include <fcntl.h>
#include <inttypes.h>
#include <errno.h>
-#include <sys/stat.h>
#include <sys/ioctl.h>
+#include <sys/poll.h>
+#include <sys/stat.h>
#include <sys/time.h>
#include <drm.h>
@@ -331,6 +332,122 @@ static void nohangcheck_hostile(int i915)
close(i915);
}
+static void kill_children(int sig)
+{
+ sighandler_t old;
+
+ old = signal(sig, SIG_IGN);
+ kill(-getpgrp(), sig);
+ signal(sig, old);
+}
+
+static bool has_persistence(int i915)
+{
+ struct drm_i915_gem_context_param p = {
+ .param = I915_CONTEXT_PARAM_PERSISTENCE,
+ };
+ uint64_t saved;
+
+ if (__gem_context_get_param(i915, &p))
+ return false;
+
+ saved = p.value;
+ p.value = 0;
+ if (__gem_context_set_param(i915, &p))
+ return false;
+
+ p.value = saved;
+ return __gem_context_set_param(i915, &p) == 0;
+}
+
+static void pi_active(int i915)
+{
+ igt_spin_t *spin = igt_spin_new(i915);
+ unsigned long count = 0;
+ bool blocked = false;
+ struct pollfd pfd;
+ int lnk[2];
+ int *done;
+
+ igt_require(gem_scheduler_enabled(i915));
+ igt_require(has_persistence(i915)); /* for graceful error recovery */
+
+ done = mmap(NULL, 4096, PROT_WRITE, MAP_SHARED | MAP_ANON, -1, 0);
+ igt_assert(done != MAP_FAILED);
+
+ igt_assert(pipe(lnk) == 0);
+
+ igt_fork(child, 1) {
+ struct sigaction sa = { .sa_handler = alarm_handler };
+
+ sigaction(SIGHUP, &sa, NULL);
+
+ do {
+ uint32_t ctx;
+
+ if (__gem_context_clone(i915, 0,
+ I915_CONTEXT_CLONE_ENGINES |
+ I915_CONTEXT_CLONE_VM,
+ 0, &ctx))
+ break;
+
+ gem_context_set_persistence(i915, ctx, false);
+ if (READ_ONCE(*done))
+ break;
+
+ spin->execbuf.rsvd1 = ctx;
+ if (__execbuf(i915, &spin->execbuf))
+ break;
+
+ count++;
+ write(lnk[1], &count, sizeof(count));
+ } while (1);
+ }
+
+ pfd.fd = lnk[0];
+ pfd.events = POLLIN;
+ close(lnk[1]);
+
+ igt_until_timeout(90) {
+ if (poll(&pfd, 1, 1000) == 0) {
+ igt_info("Child blocked after %lu active contexts\n",
+ count);
+ blocked = true;
+ break;
+ }
+ read(pfd.fd, &count, sizeof(count));
+ }
+
+ if (blocked) {
+ struct sigaction old_sa, sa = { .sa_handler = alarm_handler };
+ struct itimerval itv;
+
+ sigaction(SIGALRM, &sa, &old_sa);
+ itv.it_value.tv_sec = 0;
+ itv.it_value.tv_usec = 250000; /* 250ms */
+ setitimer(ITIMER_REAL, &itv, NULL);
+
+ igt_assert_f(__execbuf(i915, &spin->execbuf) == 0,
+ "Active execbuf blocked for more than 250ms by %lu child contexts\n",
+ count);
+
+ memset(&itv, 0, sizeof(itv));
+ setitimer(ITIMER_REAL, &itv, NULL);
+ sigaction(SIGALRM, &old_sa, NULL);
+ } else {
+ igt_info("Not blocked after %lu active contexts\n",
+ count);
+ }
+
+ *done = 1;
+ kill_children(SIGHUP);
+ igt_waitchildren();
+ gem_quiescent_gpu(i915);
+ close(lnk[0]);
+
+ munmap(done, 4096);
+}
+
igt_main
{
const uint32_t batch[2] = { 0, MI_BATCH_BUFFER_END };
@@ -375,6 +492,9 @@ igt_main
igt_subtest("basic-nohangcheck")
nohangcheck_hostile(fd);
+ igt_subtest("basic-pi-active")
+ pi_active(fd);
+
igt_subtest("reset-pin-leak") {
int i;
--
2.26.2
_______________________________________________
Intel-gfx mailing list
Intel-gfx@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/intel-gfx
^ permalink raw reply related [flat|nested] 6+ messages in thread
* [igt-dev] [PATCH i-g-t] i915/gem_ctx_exec: Exploit resource contention to verify execbuf independence
@ 2020-05-04 19:31 ` Chris Wilson
0 siblings, 0 replies; 6+ messages in thread
From: Chris Wilson @ 2020-05-04 19:31 UTC (permalink / raw)
To: intel-gfx; +Cc: igt-dev, Chris Wilson
Even if one client is blocked on a resource, that should not impact
another client.
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
---
tests/i915/gem_ctx_exec.c | 122 +++++++++++++++++++++++++++++++++++++-
1 file changed, 121 insertions(+), 1 deletion(-)
diff --git a/tests/i915/gem_ctx_exec.c b/tests/i915/gem_ctx_exec.c
index ad2f9e545..d7cd56424 100644
--- a/tests/i915/gem_ctx_exec.c
+++ b/tests/i915/gem_ctx_exec.c
@@ -35,8 +35,9 @@
#include <fcntl.h>
#include <inttypes.h>
#include <errno.h>
-#include <sys/stat.h>
#include <sys/ioctl.h>
+#include <sys/poll.h>
+#include <sys/stat.h>
#include <sys/time.h>
#include <drm.h>
@@ -331,6 +332,122 @@ static void nohangcheck_hostile(int i915)
close(i915);
}
+static void kill_children(int sig)
+{
+ sighandler_t old;
+
+ old = signal(sig, SIG_IGN);
+ kill(-getpgrp(), sig);
+ signal(sig, old);
+}
+
+static bool has_persistence(int i915)
+{
+ struct drm_i915_gem_context_param p = {
+ .param = I915_CONTEXT_PARAM_PERSISTENCE,
+ };
+ uint64_t saved;
+
+ if (__gem_context_get_param(i915, &p))
+ return false;
+
+ saved = p.value;
+ p.value = 0;
+ if (__gem_context_set_param(i915, &p))
+ return false;
+
+ p.value = saved;
+ return __gem_context_set_param(i915, &p) == 0;
+}
+
+static void pi_active(int i915)
+{
+ igt_spin_t *spin = igt_spin_new(i915);
+ unsigned long count = 0;
+ bool blocked = false;
+ struct pollfd pfd;
+ int lnk[2];
+ int *done;
+
+ igt_require(gem_scheduler_enabled(i915));
+ igt_require(has_persistence(i915)); /* for graceful error recovery */
+
+ done = mmap(NULL, 4096, PROT_WRITE, MAP_SHARED | MAP_ANON, -1, 0);
+ igt_assert(done != MAP_FAILED);
+
+ igt_assert(pipe(lnk) == 0);
+
+ igt_fork(child, 1) {
+ struct sigaction sa = { .sa_handler = alarm_handler };
+
+ sigaction(SIGHUP, &sa, NULL);
+
+ do {
+ uint32_t ctx;
+
+ if (__gem_context_clone(i915, 0,
+ I915_CONTEXT_CLONE_ENGINES |
+ I915_CONTEXT_CLONE_VM,
+ 0, &ctx))
+ break;
+
+ gem_context_set_persistence(i915, ctx, false);
+ if (READ_ONCE(*done))
+ break;
+
+ spin->execbuf.rsvd1 = ctx;
+ if (__execbuf(i915, &spin->execbuf))
+ break;
+
+ count++;
+ write(lnk[1], &count, sizeof(count));
+ } while (1);
+ }
+
+ pfd.fd = lnk[0];
+ pfd.events = POLLIN;
+ close(lnk[1]);
+
+ igt_until_timeout(90) {
+ if (poll(&pfd, 1, 1000) == 0) {
+ igt_info("Child blocked after %lu active contexts\n",
+ count);
+ blocked = true;
+ break;
+ }
+ read(pfd.fd, &count, sizeof(count));
+ }
+
+ if (blocked) {
+ struct sigaction old_sa, sa = { .sa_handler = alarm_handler };
+ struct itimerval itv;
+
+ sigaction(SIGALRM, &sa, &old_sa);
+ itv.it_value.tv_sec = 0;
+ itv.it_value.tv_usec = 250000; /* 250ms */
+ setitimer(ITIMER_REAL, &itv, NULL);
+
+ igt_assert_f(__execbuf(i915, &spin->execbuf) == 0,
+ "Active execbuf blocked for more than 250ms by %lu child contexts\n",
+ count);
+
+ memset(&itv, 0, sizeof(itv));
+ setitimer(ITIMER_REAL, &itv, NULL);
+ sigaction(SIGALRM, &old_sa, NULL);
+ } else {
+ igt_info("Not blocked after %lu active contexts\n",
+ count);
+ }
+
+ *done = 1;
+ kill_children(SIGHUP);
+ igt_waitchildren();
+ gem_quiescent_gpu(i915);
+ close(lnk[0]);
+
+ munmap(done, 4096);
+}
+
igt_main
{
const uint32_t batch[2] = { 0, MI_BATCH_BUFFER_END };
@@ -375,6 +492,9 @@ igt_main
igt_subtest("basic-nohangcheck")
nohangcheck_hostile(fd);
+ igt_subtest("basic-pi-active")
+ pi_active(fd);
+
igt_subtest("reset-pin-leak") {
int i;
--
2.26.2
_______________________________________________
igt-dev mailing list
igt-dev@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/igt-dev
^ permalink raw reply related [flat|nested] 6+ messages in thread
* [igt-dev] ✓ Fi.CI.BAT: success for i915/gem_ctx_exec: Exploit resource contention to verify execbuf independence (rev2)
2020-05-04 19:31 ` [igt-dev] " Chris Wilson
(?)
@ 2020-05-04 19:58 ` Patchwork
-1 siblings, 0 replies; 6+ messages in thread
From: Patchwork @ 2020-05-04 19:58 UTC (permalink / raw)
To: Chris Wilson; +Cc: igt-dev
== Series Details ==
Series: i915/gem_ctx_exec: Exploit resource contention to verify execbuf independence (rev2)
URL : https://patchwork.freedesktop.org/series/76896/
State : success
== Summary ==
CI Bug Log - changes from CI_DRM_8422 -> IGTPW_4530
====================================================
Summary
-------
**SUCCESS**
No regressions found.
External URL: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_4530/index.html
Known issues
------------
Here are the changes found in IGTPW_4530 that come from known issues:
### IGT changes ###
#### Issues hit ####
* igt@i915_selftest@live@active:
- fi-icl-y: [PASS][1] -> [DMESG-FAIL][2] ([i915#765])
[1]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_8422/fi-icl-y/igt@i915_selftest@live@active.html
[2]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_4530/fi-icl-y/igt@i915_selftest@live@active.html
- fi-kbl-r: [PASS][3] -> [DMESG-FAIL][4] ([i915#666])
[3]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_8422/fi-kbl-r/igt@i915_selftest@live@active.html
[4]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_4530/fi-kbl-r/igt@i915_selftest@live@active.html
* igt@i915_selftest@live@gt_engines:
- fi-bwr-2160: [PASS][5] -> [INCOMPLETE][6] ([i915#489])
[5]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_8422/fi-bwr-2160/igt@i915_selftest@live@gt_engines.html
[6]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_4530/fi-bwr-2160/igt@i915_selftest@live@gt_engines.html
[i915#489]: https://gitlab.freedesktop.org/drm/intel/issues/489
[i915#666]: https://gitlab.freedesktop.org/drm/intel/issues/666
[i915#765]: https://gitlab.freedesktop.org/drm/intel/issues/765
Participating hosts (52 -> 43)
------------------------------
Missing (9): fi-ilk-m540 fi-hsw-4200u fi-byt-squawks fi-bsw-cyan fi-kbl-7500u fi-ctg-p8600 fi-kbl-7560u fi-byt-clapper fi-bdw-samus
Build changes
-------------
* CI: CI-20190529 -> None
* IGT: IGT_5628 -> IGTPW_4530
CI-20190529: 20190529
CI_DRM_8422: 0ca0fee447b032331962bc5c717786bdb3594bd9 @ git://anongit.freedesktop.org/gfx-ci/linux
IGTPW_4530: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_4530/index.html
IGT_5628: 652a3fd8966345fa5498904ce80a2027a6782783 @ git://anongit.freedesktop.org/xorg/app/intel-gpu-tools
== Testlist changes ==
+igt@gem_ctx_exec@basic-pi-active
== Logs ==
For more details see: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_4530/index.html
_______________________________________________
igt-dev mailing list
igt-dev@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/igt-dev
^ permalink raw reply [flat|nested] 6+ messages in thread
* [igt-dev] ✓ Fi.CI.IGT: success for i915/gem_ctx_exec: Exploit resource contention to verify execbuf independence (rev2)
2020-05-04 19:31 ` [igt-dev] " Chris Wilson
(?)
(?)
@ 2020-05-05 9:30 ` Patchwork
-1 siblings, 0 replies; 6+ messages in thread
From: Patchwork @ 2020-05-05 9:30 UTC (permalink / raw)
To: Chris Wilson; +Cc: igt-dev
== Series Details ==
Series: i915/gem_ctx_exec: Exploit resource contention to verify execbuf independence (rev2)
URL : https://patchwork.freedesktop.org/series/76896/
State : success
== Summary ==
CI Bug Log - changes from CI_DRM_8422_full -> IGTPW_4530_full
====================================================
Summary
-------
**SUCCESS**
No regressions found.
External URL: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_4530/index.html
Possible new issues
-------------------
Here are the unknown changes that may have been introduced in IGTPW_4530_full:
### IGT changes ###
#### Possible regressions ####
* {igt@gem_ctx_exec@basic-pi-active} (NEW):
- shard-tglb: NOTRUN -> [SKIP][1]
[1]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_4530/shard-tglb1/igt@gem_ctx_exec@basic-pi-active.html
- shard-iclb: NOTRUN -> [SKIP][2]
[2]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_4530/shard-iclb6/igt@gem_ctx_exec@basic-pi-active.html
New tests
---------
New tests have been introduced between CI_DRM_8422_full and IGTPW_4530_full:
### New IGT tests (1) ###
* igt@gem_ctx_exec@basic-pi-active:
- Statuses : 7 skip(s)
- Exec time: [0.00] s
Known issues
------------
Here are the changes found in IGTPW_4530_full that come from known issues:
### IGT changes ###
#### Issues hit ####
* igt@gem_softpin@noreloc-s3:
- shard-kbl: [PASS][3] -> [DMESG-WARN][4] ([i915#180]) +1 similar issue
[3]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_8422/shard-kbl4/igt@gem_softpin@noreloc-s3.html
[4]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_4530/shard-kbl6/igt@gem_softpin@noreloc-s3.html
* igt@gen9_exec_parse@allowed-all:
- shard-kbl: [PASS][5] -> [DMESG-WARN][6] ([i915#1436] / [i915#716])
[5]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_8422/shard-kbl4/igt@gen9_exec_parse@allowed-all.html
[6]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_4530/shard-kbl7/igt@gen9_exec_parse@allowed-all.html
* igt@i915_suspend@fence-restore-untiled:
- shard-apl: [PASS][7] -> [DMESG-WARN][8] ([i915#180])
[7]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_8422/shard-apl6/igt@i915_suspend@fence-restore-untiled.html
[8]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_4530/shard-apl6/igt@i915_suspend@fence-restore-untiled.html
* igt@kms_cursor_crc@pipe-a-cursor-128x128-random:
- shard-kbl: [PASS][9] -> [FAIL][10] ([i915#54] / [i915#93] / [i915#95]) +2 similar issues
[9]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_8422/shard-kbl7/igt@kms_cursor_crc@pipe-a-cursor-128x128-random.html
[10]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_4530/shard-kbl2/igt@kms_cursor_crc@pipe-a-cursor-128x128-random.html
* igt@kms_pipe_crc_basic@read-crc-pipe-a-frame-sequence:
- shard-apl: [PASS][11] -> [FAIL][12] ([i915#53] / [i915#95]) +1 similar issue
[11]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_8422/shard-apl3/igt@kms_pipe_crc_basic@read-crc-pipe-a-frame-sequence.html
[12]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_4530/shard-apl4/igt@kms_pipe_crc_basic@read-crc-pipe-a-frame-sequence.html
* igt@kms_pipe_crc_basic@suspend-read-crc-pipe-a:
- shard-kbl: [PASS][13] -> [FAIL][14] ([i915#53] / [i915#93] / [i915#95]) +1 similar issue
[13]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_8422/shard-kbl4/igt@kms_pipe_crc_basic@suspend-read-crc-pipe-a.html
[14]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_4530/shard-kbl1/igt@kms_pipe_crc_basic@suspend-read-crc-pipe-a.html
* igt@kms_plane_cursor@pipe-a-viewport-size-64:
- shard-kbl: [PASS][15] -> [FAIL][16] ([i915#1559] / [i915#93] / [i915#95])
[15]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_8422/shard-kbl2/igt@kms_plane_cursor@pipe-a-viewport-size-64.html
[16]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_4530/shard-kbl4/igt@kms_plane_cursor@pipe-a-viewport-size-64.html
- shard-apl: [PASS][17] -> [FAIL][18] ([i915#1559] / [i915#95])
[17]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_8422/shard-apl8/igt@kms_plane_cursor@pipe-a-viewport-size-64.html
[18]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_4530/shard-apl7/igt@kms_plane_cursor@pipe-a-viewport-size-64.html
* igt@kms_psr@psr2_cursor_plane_onoff:
- shard-iclb: [PASS][19] -> [SKIP][20] ([fdo#109441]) +2 similar issues
[19]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_8422/shard-iclb2/igt@kms_psr@psr2_cursor_plane_onoff.html
[20]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_4530/shard-iclb8/igt@kms_psr@psr2_cursor_plane_onoff.html
#### Possible fixes ####
* {igt@gem_ctx_isolation@preservation-s3@bcs0}:
- shard-kbl: [DMESG-WARN][21] ([i915#180]) -> [PASS][22] +2 similar issues
[21]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_8422/shard-kbl6/igt@gem_ctx_isolation@preservation-s3@bcs0.html
[22]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_4530/shard-kbl1/igt@gem_ctx_isolation@preservation-s3@bcs0.html
- shard-apl: [DMESG-WARN][23] ([i915#180]) -> [PASS][24]
[23]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_8422/shard-apl1/igt@gem_ctx_isolation@preservation-s3@bcs0.html
[24]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_4530/shard-apl7/igt@gem_ctx_isolation@preservation-s3@bcs0.html
* igt@gem_exec_params@invalid-bsd-ring:
- shard-iclb: [SKIP][25] ([fdo#109276]) -> [PASS][26]
[25]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_8422/shard-iclb6/igt@gem_exec_params@invalid-bsd-ring.html
[26]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_4530/shard-iclb2/igt@gem_exec_params@invalid-bsd-ring.html
* igt@kms_cursor_crc@pipe-a-cursor-128x42-random:
- shard-kbl: [FAIL][27] ([i915#54] / [i915#93] / [i915#95]) -> [PASS][28] +1 similar issue
[27]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_8422/shard-kbl1/igt@kms_cursor_crc@pipe-a-cursor-128x42-random.html
[28]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_4530/shard-kbl7/igt@kms_cursor_crc@pipe-a-cursor-128x42-random.html
* igt@kms_cursor_legacy@cursora-vs-flipb-toggle:
- shard-hsw: [SKIP][29] ([fdo#109271]) -> [PASS][30]
[29]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_8422/shard-hsw6/igt@kms_cursor_legacy@cursora-vs-flipb-toggle.html
[30]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_4530/shard-hsw4/igt@kms_cursor_legacy@cursora-vs-flipb-toggle.html
* {igt@kms_flip@2x-plain-flip-fb-recreate@ab-hdmi-a1-hdmi-a2}:
- shard-glk: [FAIL][31] ([i915#34]) -> [PASS][32]
[31]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_8422/shard-glk9/igt@kms_flip@2x-plain-flip-fb-recreate@ab-hdmi-a1-hdmi-a2.html
[32]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_4530/shard-glk8/igt@kms_flip@2x-plain-flip-fb-recreate@ab-hdmi-a1-hdmi-a2.html
* {igt@kms_flip@flip-vs-suspend-interruptible@c-hdmi-a1}:
- shard-hsw: [INCOMPLETE][33] ([i915#61]) -> [PASS][34] +1 similar issue
[33]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_8422/shard-hsw4/igt@kms_flip@flip-vs-suspend-interruptible@c-hdmi-a1.html
[34]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_4530/shard-hsw4/igt@kms_flip@flip-vs-suspend-interruptible@c-hdmi-a1.html
* igt@kms_flip_tiling@flip-changes-tiling-yf:
- shard-kbl: [FAIL][35] ([i915#699] / [i915#93] / [i915#95]) -> [PASS][36]
[35]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_8422/shard-kbl4/igt@kms_flip_tiling@flip-changes-tiling-yf.html
[36]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_4530/shard-kbl1/igt@kms_flip_tiling@flip-changes-tiling-yf.html
- shard-apl: [FAIL][37] ([i915#95]) -> [PASS][38] +1 similar issue
[37]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_8422/shard-apl8/igt@kms_flip_tiling@flip-changes-tiling-yf.html
[38]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_4530/shard-apl2/igt@kms_flip_tiling@flip-changes-tiling-yf.html
* igt@kms_plane_alpha_blend@pipe-a-constant-alpha-min:
- shard-kbl: [FAIL][39] ([fdo#108145] / [i915#265] / [i915#93] / [i915#95]) -> [PASS][40]
[39]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_8422/shard-kbl1/igt@kms_plane_alpha_blend@pipe-a-constant-alpha-min.html
[40]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_4530/shard-kbl7/igt@kms_plane_alpha_blend@pipe-a-constant-alpha-min.html
* igt@kms_plane_alpha_blend@pipe-a-coverage-7efc:
- shard-apl: [FAIL][41] ([fdo#108145] / [i915#265] / [i915#95]) -> [PASS][42] +1 similar issue
[41]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_8422/shard-apl8/igt@kms_plane_alpha_blend@pipe-a-coverage-7efc.html
[42]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_4530/shard-apl4/igt@kms_plane_alpha_blend@pipe-a-coverage-7efc.html
* igt@kms_psr@psr2_primary_page_flip:
- shard-iclb: [SKIP][43] ([fdo#109441]) -> [PASS][44] +2 similar issues
[43]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_8422/shard-iclb4/igt@kms_psr@psr2_primary_page_flip.html
[44]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_4530/shard-iclb2/igt@kms_psr@psr2_primary_page_flip.html
* {igt@perf@blocking-parameterized}:
- shard-iclb: [FAIL][45] ([i915#1542]) -> [PASS][46]
[45]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_8422/shard-iclb3/igt@perf@blocking-parameterized.html
[46]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_4530/shard-iclb3/igt@perf@blocking-parameterized.html
* {igt@perf@polling-parameterized}:
- shard-hsw: [FAIL][47] ([i915#1542]) -> [PASS][48]
[47]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_8422/shard-hsw6/igt@perf@polling-parameterized.html
[48]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_4530/shard-hsw4/igt@perf@polling-parameterized.html
#### Warnings ####
* igt@i915_pm_dc@dc6-dpms:
- shard-tglb: [SKIP][49] ([i915#468]) -> [FAIL][50] ([i915#454])
[49]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_8422/shard-tglb2/igt@i915_pm_dc@dc6-dpms.html
[50]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_4530/shard-tglb8/igt@i915_pm_dc@dc6-dpms.html
* igt@kms_content_protection@uevent:
- shard-kbl: [FAIL][51] ([i915#357] / [i915#93] / [i915#95]) -> [FAIL][52] ([i915#357])
[51]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_8422/shard-kbl4/igt@kms_content_protection@uevent.html
[52]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_4530/shard-kbl6/igt@kms_content_protection@uevent.html
- shard-apl: [FAIL][53] ([i915#357] / [i915#95]) -> [FAIL][54] ([i915#357])
[53]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_8422/shard-apl3/igt@kms_content_protection@uevent.html
[54]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_4530/shard-apl1/igt@kms_content_protection@uevent.html
* igt@kms_fbcon_fbt@fbc-suspend:
- shard-apl: [FAIL][55] ([i915#95]) -> [DMESG-FAIL][56] ([i915#180] / [i915#95])
[55]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_8422/shard-apl3/igt@kms_fbcon_fbt@fbc-suspend.html
[56]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_4530/shard-apl2/igt@kms_fbcon_fbt@fbc-suspend.html
* igt@kms_plane_alpha_blend@pipe-a-alpha-7efc:
- shard-apl: [FAIL][57] ([fdo#108145] / [i915#265]) -> [FAIL][58] ([fdo#108145] / [i915#265] / [i915#95])
[57]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_8422/shard-apl8/igt@kms_plane_alpha_blend@pipe-a-alpha-7efc.html
[58]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_4530/shard-apl1/igt@kms_plane_alpha_blend@pipe-a-alpha-7efc.html
- shard-kbl: [FAIL][59] ([fdo#108145] / [i915#265]) -> [FAIL][60] ([fdo#108145] / [i915#265] / [i915#93] / [i915#95])
[59]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_8422/shard-kbl2/igt@kms_plane_alpha_blend@pipe-a-alpha-7efc.html
[60]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_4530/shard-kbl7/igt@kms_plane_alpha_blend@pipe-a-alpha-7efc.html
* igt@kms_vblank@pipe-c-ts-continuation-suspend:
- shard-kbl: [INCOMPLETE][61] ([i915#155] / [i915#794]) -> [DMESG-WARN][62] ([i915#180])
[61]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_8422/shard-kbl4/igt@kms_vblank@pipe-c-ts-continuation-suspend.html
[62]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_4530/shard-kbl7/igt@kms_vblank@pipe-c-ts-continuation-suspend.html
{name}: This element is suppressed. This means it is ignored when computing
the status of the difference (SUCCESS, WARNING, or FAILURE).
[fdo#108145]: https://bugs.freedesktop.org/show_bug.cgi?id=108145
[fdo#109271]: https://bugs.freedesktop.org/show_bug.cgi?id=109271
[fdo#109276]: https://bugs.freedesktop.org/show_bug.cgi?id=109276
[fdo#109441]: https://bugs.freedesktop.org/show_bug.cgi?id=109441
[i915#1436]: https://gitlab.freedesktop.org/drm/intel/issues/1436
[i915#1542]: https://gitlab.freedesktop.org/drm/intel/issues/1542
[i915#155]: https://gitlab.freedesktop.org/drm/intel/issues/155
[i915#1559]: https://gitlab.freedesktop.org/drm/intel/issues/1559
[i915#180]: https://gitlab.freedesktop.org/drm/intel/issues/180
[i915#265]: https://gitlab.freedesktop.org/drm/intel/issues/265
[i915#34]: https://gitlab.freedesktop.org/drm/intel/issues/34
[i915#357]: https://gitlab.freedesktop.org/drm/intel/issues/357
[i915#454]: https://gitlab.freedesktop.org/drm/intel/issues/454
[i915#468]: https://gitlab.freedesktop.org/drm/intel/issues/468
[i915#53]: https://gitlab.freedesktop.org/drm/intel/issues/53
[i915#54]: https://gitlab.freedesktop.org/drm/intel/issues/54
[i915#61]: https://gitlab.freedesktop.org/drm/intel/issues/61
[i915#699]: https://gitlab.freedesktop.org/drm/intel/issues/699
[i915#716]: https://gitlab.freedesktop.org/drm/intel/issues/716
[i915#794]: https://gitlab.freedesktop.org/drm/intel/issues/794
[i915#93]: https://gitlab.freedesktop.org/drm/intel/issues/93
[i915#95]: https://gitlab.freedesktop.org/drm/intel/issues/95
Participating hosts (10 -> 8)
------------------------------
Missing (2): pig-skl-6260u pig-glk-j5005
Build changes
-------------
* CI: CI-20190529 -> None
* IGT: IGT_5628 -> IGTPW_4530
* Piglit: piglit_4509 -> None
CI-20190529: 20190529
CI_DRM_8422: 0ca0fee447b032331962bc5c717786bdb3594bd9 @ git://anongit.freedesktop.org/gfx-ci/linux
IGTPW_4530: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_4530/index.html
IGT_5628: 652a3fd8966345fa5498904ce80a2027a6782783 @ git://anongit.freedesktop.org/xorg/app/intel-gpu-tools
piglit_4509: fdc5a4ca11124ab8413c7988896eec4c97336694 @ git://anongit.freedesktop.org/piglit
== Logs ==
For more details see: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_4530/index.html
_______________________________________________
igt-dev mailing list
igt-dev@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/igt-dev
^ permalink raw reply [flat|nested] 6+ messages in thread
* [Intel-gfx] [PATCH i-g-t] i915/gem_ctx_exec: Exploit resource contention to verify execbuf independence
@ 2020-05-05 10:27 Chris Wilson
0 siblings, 0 replies; 6+ messages in thread
From: Chris Wilson @ 2020-05-05 10:27 UTC (permalink / raw)
To: intel-gfx; +Cc: igt-dev, Chris Wilson
Even if one client is blocked on a resource, that should not impact
another client.
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
---
tests/i915/gem_ctx_exec.c | 122 +++++++++++++++++++++++++++++++++++++-
1 file changed, 121 insertions(+), 1 deletion(-)
diff --git a/tests/i915/gem_ctx_exec.c b/tests/i915/gem_ctx_exec.c
index ad2f9e545..97a1e0d32 100644
--- a/tests/i915/gem_ctx_exec.c
+++ b/tests/i915/gem_ctx_exec.c
@@ -35,8 +35,9 @@
#include <fcntl.h>
#include <inttypes.h>
#include <errno.h>
-#include <sys/stat.h>
#include <sys/ioctl.h>
+#include <sys/poll.h>
+#include <sys/stat.h>
#include <sys/time.h>
#include <drm.h>
@@ -331,6 +332,122 @@ static void nohangcheck_hostile(int i915)
close(i915);
}
+static void kill_children(int sig)
+{
+ sighandler_t old;
+
+ old = signal(sig, SIG_IGN);
+ kill(-getpgrp(), sig);
+ signal(sig, old);
+}
+
+static bool has_persistence(int i915)
+{
+ struct drm_i915_gem_context_param p = {
+ .param = I915_CONTEXT_PARAM_PERSISTENCE,
+ };
+ uint64_t saved;
+
+ if (__gem_context_get_param(i915, &p))
+ return false;
+
+ saved = p.value;
+ p.value = 0;
+ if (__gem_context_set_param(i915, &p))
+ return false;
+
+ p.value = saved;
+ return __gem_context_set_param(i915, &p) == 0;
+}
+
+static void pi_active(int i915)
+{
+ igt_spin_t *spin = igt_spin_new(i915);
+ unsigned long count = 0;
+ bool blocked = false;
+ struct pollfd pfd;
+ int lnk[2];
+ int *done;
+
+ igt_require(gem_scheduler_enabled(i915));
+ igt_require(has_persistence(i915)); /* for graceful error recovery */
+
+ done = mmap(NULL, 4096, PROT_WRITE, MAP_SHARED | MAP_ANON, -1, 0);
+ igt_assert(done != MAP_FAILED);
+
+ igt_assert(pipe(lnk) == 0);
+
+ igt_fork(child, 1) {
+ struct sigaction sa = { .sa_handler = alarm_handler };
+
+ sigaction(SIGHUP, &sa, NULL);
+
+ do {
+ uint32_t ctx;
+
+ if (__gem_context_clone(i915, 0,
+ I915_CONTEXT_CLONE_ENGINES |
+ I915_CONTEXT_CLONE_VM,
+ 0, &ctx))
+ break;
+
+ gem_context_set_persistence(i915, ctx, false);
+ if (READ_ONCE(*done))
+ break;
+
+ spin->execbuf.rsvd1 = ctx;
+ if (__execbuf(i915, &spin->execbuf))
+ break;
+
+ count++;
+ write(lnk[1], &count, sizeof(count));
+ } while (1);
+ }
+
+ pfd.fd = lnk[0];
+ pfd.events = POLLIN;
+ close(lnk[1]);
+
+ igt_until_timeout(90) {
+ if (poll(&pfd, 1, 1000) == 0) {
+ igt_info("Child blocked after %lu active contexts\n",
+ count);
+ blocked = true;
+ break;
+ }
+ read(pfd.fd, &count, sizeof(count));
+ }
+
+ if (blocked) {
+ struct sigaction old_sa, sa = { .sa_handler = alarm_handler };
+ struct itimerval itv;
+
+ sigaction(SIGALRM, &sa, &old_sa);
+ itv.it_value.tv_sec = 0;
+ itv.it_value.tv_usec = 250000; /* 250ms */
+ setitimer(ITIMER_REAL, &itv, NULL);
+
+ igt_assert_f(__execbuf(i915, &spin->execbuf) == 0,
+ "Active execbuf blocked for more than 250ms by %lu child contexts\n",
+ count);
+
+ memset(&itv, 0, sizeof(itv));
+ setitimer(ITIMER_REAL, &itv, NULL);
+ sigaction(SIGALRM, &old_sa, NULL);
+ } else {
+ igt_info("Not blocked after %lu active contexts\n",
+ count);
+ }
+
+ *done = 1;
+ kill_children(SIGHUP);
+ igt_waitchildren();
+ gem_quiescent_gpu(i915);
+ close(lnk[0]);
+
+ munmap(done, 4096);
+}
+
igt_main
{
const uint32_t batch[2] = { 0, MI_BATCH_BUFFER_END };
@@ -369,6 +486,9 @@ igt_main
igt_subtest("eviction")
big_exec(fd, handle, 0);
+ igt_subtest("basic-pi-active")
+ pi_active(fd);
+
igt_subtest("basic-norecovery")
norecovery(fd);
--
2.26.2
_______________________________________________
Intel-gfx mailing list
Intel-gfx@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/intel-gfx
^ permalink raw reply related [flat|nested] 6+ messages in thread
* [Intel-gfx] [PATCH i-g-t] i915/gem_ctx_exec: Exploit resource contention to verify execbuf independence
@ 2020-05-04 9:52 Chris Wilson
0 siblings, 0 replies; 6+ messages in thread
From: Chris Wilson @ 2020-05-04 9:52 UTC (permalink / raw)
To: intel-gfx; +Cc: igt-dev, Chris Wilson
Even if one client is blocked on a resource, that should not impact
another client.
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
---
tests/i915/gem_ctx_exec.c | 100 +++++++++++++++++++++++++++++++++++++-
1 file changed, 99 insertions(+), 1 deletion(-)
diff --git a/tests/i915/gem_ctx_exec.c b/tests/i915/gem_ctx_exec.c
index ad2f9e545..fbc575cea 100644
--- a/tests/i915/gem_ctx_exec.c
+++ b/tests/i915/gem_ctx_exec.c
@@ -35,8 +35,9 @@
#include <fcntl.h>
#include <inttypes.h>
#include <errno.h>
-#include <sys/stat.h>
#include <sys/ioctl.h>
+#include <sys/poll.h>
+#include <sys/stat.h>
#include <sys/time.h>
#include <drm.h>
@@ -331,6 +332,100 @@ static void nohangcheck_hostile(int i915)
close(i915);
}
+static void kill_children(int sig)
+{
+ signal(sig, SIG_IGN);
+ kill(-getpgrp(), sig);
+ signal(sig, SIG_DFL);
+}
+
+static void pi_active(int fd)
+{
+ igt_spin_t *spin = igt_spin_new(fd);
+ unsigned long count = 0;
+ bool blocked = false;
+ struct pollfd pfd;
+ int lnk[2];
+ int *done;
+
+ done = mmap(NULL, 4096, PROT_WRITE, MAP_SHARED | MAP_ANON, -1, 0);
+ igt_assert(done != MAP_FAILED);
+
+ igt_assert(pipe(lnk) == 0);
+
+ igt_fork(child, 1) {
+ struct sigaction sa = { .sa_handler = alarm_handler };
+
+ igt_unshare_spins();
+ sigaction(SIGHUP, &sa, NULL);
+
+ count = 1;
+ do {
+ struct drm_i915_gem_execbuffer2 execbuf;
+ uint32_t ctx_id;
+
+ if (__gem_context_clone(fd, 0,
+ I915_CONTEXT_CLONE_ENGINES,
+ 0, &ctx_id))
+ break;
+
+ if (READ_ONCE(*done))
+ break;
+
+ execbuf = spin->execbuf;
+ execbuf.rsvd1 = ctx_id;
+ if (__execbuf(fd, &execbuf))
+ break;
+
+ count++;
+ write(lnk[1], &count, sizeof(count));
+ } while (1);
+ }
+
+ pfd.fd = lnk[0];
+ pfd.events = POLLIN;
+ close(lnk[1]);
+
+ igt_until_timeout(60) {
+ if (poll(&pfd, 1, 1000) == 0) {
+ igt_info("Child blocked after %lu active contexts\n",
+ count);
+ blocked = true;
+ break;
+ }
+ read(pfd.fd, &count, sizeof(count));
+ }
+
+ if (blocked) {
+ struct sigaction old_sa, sa = { .sa_handler = alarm_handler };
+ struct itimerval itv;
+
+ sigaction(SIGALRM, &sa, &old_sa);
+ itv.it_value.tv_sec = 0;
+ itv.it_value.tv_usec = 250000; /* 250ms */
+ setitimer(ITIMER_REAL, &itv, NULL);
+
+ igt_assert_f(__execbuf(fd, &spin->execbuf) == 0,
+ "Active execbuf blocked for more than 250ms by %lu child contexts\n",
+ count);
+
+ memset(&itv, 0, sizeof(itv));
+ setitimer(ITIMER_REAL, &itv, NULL);
+ sigaction(SIGALRM, &old_sa, NULL);
+ } else {
+ igt_info("Not blocked after %lu active contexts\n",
+ count);
+ }
+
+ *done = 1;
+ kill_children(SIGHUP);
+ igt_waitchildren();
+ gem_quiescent_gpu(fd);
+ close(lnk[0]);
+
+ munmap(done, 4096);
+}
+
igt_main
{
const uint32_t batch[2] = { 0, MI_BATCH_BUFFER_END };
@@ -375,6 +470,9 @@ igt_main
igt_subtest("basic-nohangcheck")
nohangcheck_hostile(fd);
+ igt_subtest("basic-pi-active")
+ pi_active(fd);
+
igt_subtest("reset-pin-leak") {
int i;
--
2.26.2
_______________________________________________
Intel-gfx mailing list
Intel-gfx@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/intel-gfx
^ permalink raw reply related [flat|nested] 6+ messages in thread
end of thread, other threads:[~2020-05-05 10:27 UTC | newest]
Thread overview: 6+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2020-05-04 19:31 [Intel-gfx] [PATCH i-g-t] i915/gem_ctx_exec: Exploit resource contention to verify execbuf independence Chris Wilson
2020-05-04 19:31 ` [igt-dev] " Chris Wilson
2020-05-04 19:58 ` [igt-dev] ✓ Fi.CI.BAT: success for i915/gem_ctx_exec: Exploit resource contention to verify execbuf independence (rev2) Patchwork
2020-05-05 9:30 ` [igt-dev] ✓ Fi.CI.IGT: " Patchwork
-- strict thread matches above, loose matches on Subject: below --
2020-05-05 10:27 [Intel-gfx] [PATCH i-g-t] i915/gem_ctx_exec: Exploit resource contention to verify execbuf independence Chris Wilson
2020-05-04 9:52 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.