* [igt-dev] [PATCH i-g-t] igt/gem_ctx_switch: Show the combined ctx-switch latency
@ 2018-08-15 11:15 Chris Wilson
2018-08-15 11:19 ` Chris Wilson
` (2 more replies)
0 siblings, 3 replies; 5+ messages in thread
From: Chris Wilson @ 2018-08-15 11:15 UTC (permalink / raw)
To: intel-gfx; +Cc: igt-dev
Since we submit from several processes to the same engine for the forked
tests, the total number of context switches is the sum of each process
and needs to be combined together to compute the individual cs latency.
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
---
tests/gem_ctx_switch.c | 27 +++++++++++++++++++++++++++
1 file changed, 27 insertions(+)
diff --git a/tests/gem_ctx_switch.c b/tests/gem_ctx_switch.c
index 6770e001f..58b9bfd3e 100644
--- a/tests/gem_ctx_switch.c
+++ b/tests/gem_ctx_switch.c
@@ -94,8 +94,15 @@ static void single(int fd, uint32_t handle,
struct drm_i915_gem_exec_object2 obj;
struct drm_i915_gem_relocation_entry reloc;
uint32_t contexts[64];
+ struct {
+ double elapsed;
+ unsigned long count;
+ } *shared;
int n;
+ shared = mmap(NULL, 4096, PROT_WRITE, MAP_SHARED | MAP_ANON, -1, 0);
+ igt_assert(shared != MAP_FAILED);
+
gem_require_ring(fd, e->exec_id | e->flags);
for (n = 0; n < 64; n++) {
@@ -163,11 +170,31 @@ static void single(int fd, uint32_t handle,
igt_info("[%d] %s: %'u cycles: %.3fus%s\n",
child, e->name, count, elapsed(&start, &now)*1e6 / count,
flags & INTERRUPTIBLE ? " (interruptible)" : "");
+
+ shared[child].elapsed = elapsed(&start, &now);
+ shared[child].count = count;
}
igt_waitchildren();
+ if (ncpus > 1) {
+ unsigned long total;
+ double max = 0;
+
+ for (n = 0; n < ncpus; n++) {
+ total += shared[n].count;
+ if (shared[n].elapsed > max)
+ max = shared[n].elapsed;
+ }
+
+ igt_info("Total %s: %'lu cycles: %.3fus%s\n",
+ e->name, total, max*1e6 / total,
+ flags & INTERRUPTIBLE ? " (interruptible)" : "");
+ }
+
for (n = 0; n < 64; n++)
gem_context_destroy(fd, contexts[n]);
+
+ munmap(shared, 4096);
}
static void all(int fd, uint32_t handle, unsigned flags, int timeout)
--
2.18.0
_______________________________________________
igt-dev mailing list
igt-dev@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/igt-dev
^ permalink raw reply related [flat|nested] 5+ messages in thread* Re: [igt-dev] [PATCH i-g-t] igt/gem_ctx_switch: Show the combined ctx-switch latency 2018-08-15 11:15 [igt-dev] [PATCH i-g-t] igt/gem_ctx_switch: Show the combined ctx-switch latency Chris Wilson @ 2018-08-15 11:19 ` Chris Wilson 2018-08-15 12:19 ` [igt-dev] [Intel-gfx] " Mika Kuoppala 2018-08-15 16:28 ` [igt-dev] ✓ Fi.CI.BAT: success for " Patchwork 2018-08-15 21:31 ` [igt-dev] ✓ Fi.CI.IGT: " Patchwork 2 siblings, 1 reply; 5+ messages in thread From: Chris Wilson @ 2018-08-15 11:19 UTC (permalink / raw) To: intel-gfx; +Cc: igt-dev Quoting Chris Wilson (2018-08-15 12:15:53) > + if (ncpus > 1) { > + unsigned long total; Imagine the hidden = 0 here. -Chris _______________________________________________ igt-dev mailing list igt-dev@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/igt-dev ^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: [igt-dev] [Intel-gfx] [PATCH i-g-t] igt/gem_ctx_switch: Show the combined ctx-switch latency 2018-08-15 11:19 ` Chris Wilson @ 2018-08-15 12:19 ` Mika Kuoppala 0 siblings, 0 replies; 5+ messages in thread From: Mika Kuoppala @ 2018-08-15 12:19 UTC (permalink / raw) To: Chris Wilson, intel-gfx; +Cc: igt-dev Chris Wilson <chris@chris-wilson.co.uk> writes: > Quoting Chris Wilson (2018-08-15 12:15:53) >> + if (ncpus > 1) { >> + unsigned long total; > > Imagine the hidden = 0 here. I did. With imagination realized, Perhaps on some rainy day someone will move elapsed into lib. Reviewed-by: Mika Kuoppala <mika.kuoppala@linux.intel.com> -Mika _______________________________________________ igt-dev mailing list igt-dev@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/igt-dev ^ permalink raw reply [flat|nested] 5+ messages in thread
* [igt-dev] ✓ Fi.CI.BAT: success for igt/gem_ctx_switch: Show the combined ctx-switch latency 2018-08-15 11:15 [igt-dev] [PATCH i-g-t] igt/gem_ctx_switch: Show the combined ctx-switch latency Chris Wilson 2018-08-15 11:19 ` Chris Wilson @ 2018-08-15 16:28 ` Patchwork 2018-08-15 21:31 ` [igt-dev] ✓ Fi.CI.IGT: " Patchwork 2 siblings, 0 replies; 5+ messages in thread From: Patchwork @ 2018-08-15 16:28 UTC (permalink / raw) To: Chris Wilson; +Cc: igt-dev == Series Details == Series: igt/gem_ctx_switch: Show the combined ctx-switch latency URL : https://patchwork.freedesktop.org/series/48248/ State : success == Summary == = CI Bug Log - changes from CI_DRM_4669 -> IGTPW_1718 = == Summary - SUCCESS == No regressions found. External URL: https://patchwork.freedesktop.org/api/1.0/series/48248/revisions/1/mbox/ == Known issues == Here are the changes found in IGTPW_1718 that come from known issues: === IGT changes === ==== Issues hit ==== igt@drv_selftest@live_workarounds: fi-kbl-x1275: PASS -> DMESG-FAIL (fdo#107292) fi-skl-6700k2: PASS -> DMESG-FAIL (fdo#107292) igt@kms_frontbuffer_tracking@basic: fi-hsw-peppy: PASS -> DMESG-FAIL (fdo#102614) {fi-byt-clapper}: PASS -> FAIL (fdo#103167) {igt@kms_psr@primary_mmap_gtt}: fi-cnl-psr: PASS -> DMESG-WARN (fdo#107372) ==== Possible fixes ==== igt@drv_selftest@live_hangcheck: fi-skl-guc: DMESG-FAIL (fdo#107174) -> PASS igt@drv_selftest@live_workarounds: fi-cnl-psr: DMESG-FAIL (fdo#107292) -> PASS fi-kbl-7560u: DMESG-FAIL (fdo#107292) -> PASS {name}: This element is suppressed. This means it is ignored when computing the status of the difference (SUCCESS, WARNING, or FAILURE). fdo#102614 https://bugs.freedesktop.org/show_bug.cgi?id=102614 fdo#103167 https://bugs.freedesktop.org/show_bug.cgi?id=103167 fdo#107174 https://bugs.freedesktop.org/show_bug.cgi?id=107174 fdo#107292 https://bugs.freedesktop.org/show_bug.cgi?id=107292 fdo#107372 https://bugs.freedesktop.org/show_bug.cgi?id=107372 == Participating hosts (53 -> 47) == Missing (6): fi-ilk-m540 fi-hsw-4200u fi-byt-j1900 fi-byt-squawks fi-bsw-cyan fi-ctg-p8600 == Build changes == * IGT: IGT_4597 -> IGTPW_1718 CI_DRM_4669: aea12ded40860145c23f1c1a28a386fb97ae6e4e @ git://anongit.freedesktop.org/gfx-ci/linux IGTPW_1718: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_1718/ IGT_4597: 347a07ba3d7796f7f701baed1599319fe3fc1958 @ git://anongit.freedesktop.org/xorg/app/intel-gpu-tools == Logs == For more details see: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_1718/issues.html _______________________________________________ igt-dev mailing list igt-dev@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/igt-dev ^ permalink raw reply [flat|nested] 5+ messages in thread
* [igt-dev] ✓ Fi.CI.IGT: success for igt/gem_ctx_switch: Show the combined ctx-switch latency 2018-08-15 11:15 [igt-dev] [PATCH i-g-t] igt/gem_ctx_switch: Show the combined ctx-switch latency Chris Wilson 2018-08-15 11:19 ` Chris Wilson 2018-08-15 16:28 ` [igt-dev] ✓ Fi.CI.BAT: success for " Patchwork @ 2018-08-15 21:31 ` Patchwork 2 siblings, 0 replies; 5+ messages in thread From: Patchwork @ 2018-08-15 21:31 UTC (permalink / raw) To: Chris Wilson; +Cc: igt-dev == Series Details == Series: igt/gem_ctx_switch: Show the combined ctx-switch latency URL : https://patchwork.freedesktop.org/series/48248/ State : success == Summary == = CI Bug Log - changes from IGT_4597_full -> IGTPW_1718_full = == Summary - WARNING == Minor unknown changes coming with IGTPW_1718_full need to be verified manually. If you think the reported changes have nothing to do with the changes introduced in IGTPW_1718_full, please notify your bug team to allow them to document this new failure mode, which will reduce false positives in CI. External URL: https://patchwork.freedesktop.org/api/1.0/series/48248/revisions/1/mbox/ == Possible new issues == Here are the unknown changes that may have been introduced in IGTPW_1718_full: === IGT changes === ==== Warnings ==== igt@kms_cursor_crc@cursor-256x256-dpms: shard-snb: PASS -> SKIP +1 == Known issues == Here are the changes found in IGTPW_1718_full that come from known issues: === IGT changes === ==== Issues hit ==== igt@gem_exec_flush@basic-wb-set-default: shard-snb: PASS -> INCOMPLETE (fdo#105411) igt@kms_frontbuffer_tracking@fbc-1p-primscrn-spr-indfb-draw-mmap-gtt: shard-snb: PASS -> DMESG-FAIL (fdo#103167) igt@kms_vblank@pipe-c-ts-continuation-dpms-suspend: shard-kbl: PASS -> INCOMPLETE (fdo#103665) igt@testdisplay: shard-glk: PASS -> INCOMPLETE (fdo#107093, fdo#103359, k.org#198133) ==== Possible fixes ==== igt@kms_available_modes_crc@available_mode_test_crc: shard-snb: FAIL (fdo#106641) -> PASS igt@kms_busy@extended-modeset-hang-oldfb-render-e: shard-snb: INCOMPLETE (fdo#105411) -> SKIP igt@kms_plane@pixel-format-pipe-a-planes: shard-snb: FAIL (fdo#107161) -> PASS igt@kms_rotation_crc@primary-rotation-180: shard-snb: FAIL (fdo#103925) -> PASS fdo#103167 https://bugs.freedesktop.org/show_bug.cgi?id=103167 fdo#103359 https://bugs.freedesktop.org/show_bug.cgi?id=103359 fdo#103665 https://bugs.freedesktop.org/show_bug.cgi?id=103665 fdo#103925 https://bugs.freedesktop.org/show_bug.cgi?id=103925 fdo#105411 https://bugs.freedesktop.org/show_bug.cgi?id=105411 fdo#106641 https://bugs.freedesktop.org/show_bug.cgi?id=106641 fdo#107093 https://bugs.freedesktop.org/show_bug.cgi?id=107093 fdo#107161 https://bugs.freedesktop.org/show_bug.cgi?id=107161 k.org#198133 https://bugzilla.kernel.org/show_bug.cgi?id=198133 == Participating hosts (5 -> 5) == No changes in participating hosts == Build changes == * IGT: IGT_4597 -> IGTPW_1718 * Linux: CI_DRM_4668 -> CI_DRM_4669 CI_DRM_4668: 8bae517a4dd2ab6ba57b880835fd253e169779f2 @ git://anongit.freedesktop.org/gfx-ci/linux CI_DRM_4669: aea12ded40860145c23f1c1a28a386fb97ae6e4e @ git://anongit.freedesktop.org/gfx-ci/linux IGTPW_1718: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_1718/ IGT_4597: 347a07ba3d7796f7f701baed1599319fe3fc1958 @ git://anongit.freedesktop.org/xorg/app/intel-gpu-tools == Logs == For more details see: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_1718/shards.html _______________________________________________ igt-dev mailing list igt-dev@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/igt-dev ^ permalink raw reply [flat|nested] 5+ messages in thread
end of thread, other threads:[~2018-08-15 21:31 UTC | newest] Thread overview: 5+ messages (download: mbox.gz follow: Atom feed -- links below jump to the message on this page -- 2018-08-15 11:15 [igt-dev] [PATCH i-g-t] igt/gem_ctx_switch: Show the combined ctx-switch latency Chris Wilson 2018-08-15 11:19 ` Chris Wilson 2018-08-15 12:19 ` [igt-dev] [Intel-gfx] " Mika Kuoppala 2018-08-15 16:28 ` [igt-dev] ✓ Fi.CI.BAT: success for " Patchwork 2018-08-15 21:31 ` [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; as well as URLs for NNTP newsgroup(s).