* [igt-dev] [PATCH i-g-t] i915/gem_sync: Make switch-default asymmetric @ 2019-01-23 22:58 Chris Wilson 2019-01-23 23:23 ` [igt-dev] ✓ Fi.CI.BAT: success for " Patchwork 2019-01-24 0:10 ` [igt-dev] ✓ Fi.CI.IGT: " Patchwork 0 siblings, 2 replies; 3+ messages in thread From: Chris Wilson @ 2019-01-23 22:58 UTC (permalink / raw) To: intel-gfx; +Cc: igt-dev To make the demonstration of the cheeky preemption more impactful, make the second context a nop to contrast the first being 1024 MI_STORE_DWORD_IMM. Then if we execute and wait on the second context before executing the first, the client latency is even more drastically reduced. To more clearly show any effect on wait reordering, measure the alternative path and present both. Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk> --- tests/i915/gem_sync.c | 40 +++++++++++++++++++++++++++++----------- 1 file changed, 29 insertions(+), 11 deletions(-) diff --git a/tests/i915/gem_sync.c b/tests/i915/gem_sync.c index fb209977d..3e4feff32 100644 --- a/tests/i915/gem_sync.c +++ b/tests/i915/gem_sync.c @@ -651,7 +651,7 @@ switch_ring(int fd, unsigned ring, int num_children, int timeout) struct drm_i915_gem_relocation_entry reloc[1024]; struct drm_i915_gem_execbuffer2 execbuf; } contexts[2]; - double start, elapsed; + double elapsed, baseline; unsigned long cycles; for (int i = 0; i < ARRAY_SIZE(contexts); i++) { @@ -679,7 +679,7 @@ switch_ring(int fd, unsigned ring, int num_children, int timeout) c->object[1].handle = gem_create(fd, sz); c->object[1].relocs_ptr = to_user_pointer(c->reloc); - c->object[1].relocation_count = 1024; + c->object[1].relocation_count = 1024 * i; batch = gem_mmap__cpu(fd, c->object[1].handle, 0, sz, PROT_WRITE | PROT_READ); @@ -688,7 +688,7 @@ switch_ring(int fd, unsigned ring, int num_children, int timeout) memset(c->reloc, 0, sizeof(c->reloc)); b = batch; - for (int r = 0; r < 1024; r++) { + for (int r = 0; r < c->object[1].relocation_count; r++) { uint64_t offset; c->reloc[r].presumed_offset = c->object[0].offset; @@ -722,26 +722,44 @@ switch_ring(int fd, unsigned ring, int num_children, int timeout) } cycles = 0; - elapsed = 0; - start = gettime(); - do { + baseline = 0; + igt_until_timeout(timeout) { do { double this; - gem_execbuf(fd, &contexts[0].execbuf); gem_execbuf(fd, &contexts[1].execbuf); + gem_execbuf(fd, &contexts[0].execbuf); this = gettime(); gem_sync(fd, contexts[1].object[1].handle); - elapsed += gettime() - this; + gem_sync(fd, contexts[0].object[1].handle); + baseline += gettime() - this; + } while (++cycles & 1023); + } + baseline /= cycles; + + cycles = 0; + elapsed = 0; + igt_until_timeout(timeout) { + do { + double this; + gem_execbuf(fd, &contexts[1].execbuf); + gem_execbuf(fd, &contexts[0].execbuf); + + this = gettime(); gem_sync(fd, contexts[0].object[1].handle); + elapsed += gettime() - this; + + gem_sync(fd, contexts[1].object[1].handle); } while (++cycles & 1023); - } while ((gettime() - start) < timeout); - igt_info("%s%sompleted %ld cycles: %.3f us\n", + } + elapsed /= cycles; + + igt_info("%s%sompleted %ld cycles: %.3f us, baseline %.3f us\n", names[child % num_engines] ?: "", names[child % num_engines] ? " c" : "C", - cycles, elapsed*1e6/cycles); + cycles, elapsed*1e6, baseline*1e6); for (int i = 0; i < ARRAY_SIZE(contexts); i++) { gem_close(fd, contexts[i].object[1].handle); -- 2.20.1 _______________________________________________ igt-dev mailing list igt-dev@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/igt-dev ^ permalink raw reply related [flat|nested] 3+ messages in thread
* [igt-dev] ✓ Fi.CI.BAT: success for i915/gem_sync: Make switch-default asymmetric 2019-01-23 22:58 [igt-dev] [PATCH i-g-t] i915/gem_sync: Make switch-default asymmetric Chris Wilson @ 2019-01-23 23:23 ` Patchwork 2019-01-24 0:10 ` [igt-dev] ✓ Fi.CI.IGT: " Patchwork 1 sibling, 0 replies; 3+ messages in thread From: Patchwork @ 2019-01-23 23:23 UTC (permalink / raw) To: Chris Wilson; +Cc: igt-dev == Series Details == Series: i915/gem_sync: Make switch-default asymmetric URL : https://patchwork.freedesktop.org/series/55657/ State : success == Summary == CI Bug Log - changes from CI_DRM_5471 -> IGTPW_2285 ==================================================== Summary ------- **SUCCESS** No regressions found. External URL: https://patchwork.freedesktop.org/api/1.0/series/55657/revisions/1/mbox/ Known issues ------------ Here are the changes found in IGTPW_2285 that come from known issues: ### IGT changes ### #### Issues hit #### * igt@i915_selftest@live_hangcheck: - fi-bwr-2160: PASS -> DMESG-FAIL [fdo#108735] * igt@kms_chamelium@common-hpd-after-suspend: - fi-skl-6700k2: PASS -> INCOMPLETE [fdo#104108] * igt@prime_vgem@basic-fence-flip: - fi-ilk-650: PASS -> FAIL [fdo#104008] #### Possible fixes #### * igt@kms_busy@basic-flip-c: - fi-kbl-7500u: {SKIP} [fdo#109271] / [fdo#109278] -> PASS +2 * igt@kms_chamelium@dp-hpd-fast: - fi-kbl-7500u: DMESG-WARN [fdo#102505] / [fdo#103558] / [fdo#105602] -> PASS * igt@kms_chamelium@hdmi-hpd-fast: - fi-kbl-7500u: FAIL [fdo#108767] -> PASS * igt@kms_pipe_crc_basic@suspend-read-crc-pipe-a: - fi-byt-clapper: FAIL [fdo#103191] / [fdo#107362] -> PASS * igt@kms_pipe_crc_basic@suspend-read-crc-pipe-b: - fi-blb-e6850: INCOMPLETE [fdo#107718] -> PASS {name}: This element is suppressed. This means it is ignored when computing the status of the difference (SUCCESS, WARNING, or FAILURE). [fdo#102505]: https://bugs.freedesktop.org/show_bug.cgi?id=102505 [fdo#103191]: https://bugs.freedesktop.org/show_bug.cgi?id=103191 [fdo#103558]: https://bugs.freedesktop.org/show_bug.cgi?id=103558 [fdo#104008]: https://bugs.freedesktop.org/show_bug.cgi?id=104008 [fdo#104108]: https://bugs.freedesktop.org/show_bug.cgi?id=104108 [fdo#105602]: https://bugs.freedesktop.org/show_bug.cgi?id=105602 [fdo#107362]: https://bugs.freedesktop.org/show_bug.cgi?id=107362 [fdo#107718]: https://bugs.freedesktop.org/show_bug.cgi?id=107718 [fdo#108735]: https://bugs.freedesktop.org/show_bug.cgi?id=108735 [fdo#108767]: https://bugs.freedesktop.org/show_bug.cgi?id=108767 [fdo#109271]: https://bugs.freedesktop.org/show_bug.cgi?id=109271 [fdo#109278]: https://bugs.freedesktop.org/show_bug.cgi?id=109278 Participating hosts (46 -> 37) ------------------------------ Missing (9): fi-kbl-soraka fi-ilk-m540 fi-bdw-gvtdvm fi-byt-squawks fi-bsw-cyan fi-gdg-551 fi-pnv-d510 fi-icl-y fi-bdw-samus Build changes ------------- * IGT: IGT_4786 -> IGTPW_2285 CI_DRM_5471: 198addb18e12d2469bc41d57f9ed63e1072a7f82 @ git://anongit.freedesktop.org/gfx-ci/linux IGTPW_2285: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_2285/ IGT_4786: 85cf76182087c09604bcae2bbee9e58b33bcb4f2 @ git://anongit.freedesktop.org/xorg/app/intel-gpu-tools == Logs == For more details see: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_2285/ _______________________________________________ igt-dev mailing list igt-dev@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/igt-dev ^ permalink raw reply [flat|nested] 3+ messages in thread
* [igt-dev] ✓ Fi.CI.IGT: success for i915/gem_sync: Make switch-default asymmetric 2019-01-23 22:58 [igt-dev] [PATCH i-g-t] i915/gem_sync: Make switch-default asymmetric Chris Wilson 2019-01-23 23:23 ` [igt-dev] ✓ Fi.CI.BAT: success for " Patchwork @ 2019-01-24 0:10 ` Patchwork 1 sibling, 0 replies; 3+ messages in thread From: Patchwork @ 2019-01-24 0:10 UTC (permalink / raw) To: Chris Wilson; +Cc: igt-dev == Series Details == Series: i915/gem_sync: Make switch-default asymmetric URL : https://patchwork.freedesktop.org/series/55657/ State : success == Summary == CI Bug Log - changes from CI_DRM_5471_full -> IGTPW_2285_full ==================================================== Summary ------- **SUCCESS** No regressions found. External URL: https://patchwork.freedesktop.org/api/1.0/series/55657/revisions/1/mbox/ Known issues ------------ Here are the changes found in IGTPW_2285_full that come from known issues: ### IGT changes ### #### Issues hit #### * igt@gem_workarounds@suspend-resume: - shard-kbl: PASS -> INCOMPLETE [fdo#103665] * igt@kms_available_modes_crc@available_mode_test_crc: - shard-apl: PASS -> FAIL [fdo#106641] * igt@kms_busy@extended-modeset-hang-newfb-with-reset-render-b: - shard-kbl: NOTRUN -> DMESG-WARN [fdo#107956] +1 * igt@kms_cursor_crc@cursor-128x128-onscreen: - shard-glk: PASS -> FAIL [fdo#103232] +1 * igt@kms_cursor_crc@cursor-128x128-suspend: - shard-apl: PASS -> FAIL [fdo#103191] / [fdo#103232] * igt@kms_cursor_crc@cursor-64x64-random: - shard-apl: PASS -> FAIL [fdo#103232] * igt@kms_flip@2x-flip-vs-expired-vblank-interruptible: - shard-glk: PASS -> FAIL [fdo#105363] * igt@kms_plane@plane-position-covered-pipe-c-planes: - shard-apl: PASS -> FAIL [fdo#103166] +5 - shard-glk: PASS -> FAIL [fdo#103166] +1 * igt@kms_plane_multiple@atomic-pipe-c-tiling-y: - shard-kbl: PASS -> FAIL [fdo#103166] * igt@kms_rotation_crc@multiplane-rotation-cropping-top: - shard-kbl: NOTRUN -> FAIL [fdo#109381] * igt@kms_setmode@basic: - shard-kbl: PASS -> FAIL [fdo#99912] #### Possible fixes #### * igt@gem_pwrite@big-cpu-backwards: - shard-snb: INCOMPLETE [fdo#105411] -> PASS * igt@kms_cursor_crc@cursor-128x128-random: - shard-apl: FAIL [fdo#103232] -> PASS +5 * igt@kms_cursor_crc@cursor-128x128-suspend: - shard-glk: FAIL [fdo#103232] -> PASS +3 * igt@kms_cursor_crc@cursor-128x42-sliding: - shard-kbl: FAIL [fdo#103232] -> PASS +1 * igt@kms_plane@pixel-format-pipe-a-planes-source-clamping: - shard-apl: FAIL [fdo#108948] -> PASS * igt@kms_plane@plane-panning-bottom-right-suspend-pipe-c-planes: - shard-kbl: INCOMPLETE [fdo#103665] -> PASS +1 * igt@kms_plane@plane-position-covered-pipe-a-planes: - shard-glk: FAIL [fdo#103166] -> PASS - shard-apl: FAIL [fdo#103166] -> PASS * igt@kms_plane_alpha_blend@pipe-a-alpha-opaque-fb: - shard-glk: FAIL [fdo#108145] -> PASS * igt@kms_plane_multiple@atomic-pipe-a-tiling-none: - shard-kbl: FAIL [fdo#103166] -> PASS +1 * igt@kms_rotation_crc@multiplane-rotation-cropping-top: - shard-apl: DMESG-FAIL [fdo#108950] -> PASS * igt@pm_rc6_residency@rc6-accuracy: - shard-snb: {SKIP} [fdo#109271] -> PASS #### Warnings #### * igt@i915_suspend@shrink: - shard-glk: DMESG-WARN [fdo#109244] -> INCOMPLETE [fdo#103359] / [fdo#106886] / [k.org#198133] {name}: This element is suppressed. This means it is ignored when computing the status of the difference (SUCCESS, WARNING, or FAILURE). [fdo#103166]: https://bugs.freedesktop.org/show_bug.cgi?id=103166 [fdo#103191]: https://bugs.freedesktop.org/show_bug.cgi?id=103191 [fdo#103232]: https://bugs.freedesktop.org/show_bug.cgi?id=103232 [fdo#103359]: https://bugs.freedesktop.org/show_bug.cgi?id=103359 [fdo#103665]: https://bugs.freedesktop.org/show_bug.cgi?id=103665 [fdo#105363]: https://bugs.freedesktop.org/show_bug.cgi?id=105363 [fdo#105411]: https://bugs.freedesktop.org/show_bug.cgi?id=105411 [fdo#106641]: https://bugs.freedesktop.org/show_bug.cgi?id=106641 [fdo#106886]: https://bugs.freedesktop.org/show_bug.cgi?id=106886 [fdo#107956]: https://bugs.freedesktop.org/show_bug.cgi?id=107956 [fdo#108145]: https://bugs.freedesktop.org/show_bug.cgi?id=108145 [fdo#108948]: https://bugs.freedesktop.org/show_bug.cgi?id=108948 [fdo#108950]: https://bugs.freedesktop.org/show_bug.cgi?id=108950 [fdo#109244]: https://bugs.freedesktop.org/show_bug.cgi?id=109244 [fdo#109271]: https://bugs.freedesktop.org/show_bug.cgi?id=109271 [fdo#109278]: https://bugs.freedesktop.org/show_bug.cgi?id=109278 [fdo#109381]: https://bugs.freedesktop.org/show_bug.cgi?id=109381 [fdo#99912]: https://bugs.freedesktop.org/show_bug.cgi?id=99912 [k.org#198133]: https://bugzilla.kernel.org/show_bug.cgi?id=198133 Participating hosts (7 -> 5) ------------------------------ Missing (2): shard-skl shard-iclb Build changes ------------- * IGT: IGT_4786 -> IGTPW_2285 * Piglit: piglit_4509 -> None CI_DRM_5471: 198addb18e12d2469bc41d57f9ed63e1072a7f82 @ git://anongit.freedesktop.org/gfx-ci/linux IGTPW_2285: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_2285/ IGT_4786: 85cf76182087c09604bcae2bbee9e58b33bcb4f2 @ 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_2285/ _______________________________________________ igt-dev mailing list igt-dev@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/igt-dev ^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~2019-01-24 0:10 UTC | newest] Thread overview: 3+ messages (download: mbox.gz follow: Atom feed -- links below jump to the message on this page -- 2019-01-23 22:58 [igt-dev] [PATCH i-g-t] i915/gem_sync: Make switch-default asymmetric Chris Wilson 2019-01-23 23:23 ` [igt-dev] ✓ Fi.CI.BAT: success for " Patchwork 2019-01-24 0:10 ` [igt-dev] ✓ Fi.CI.IGT: " Patchwork
This is a public inbox, see mirroring instructions for how to clone and mirror all data and code used for this inbox