* [PATCH igt] igt/pm_rc6_residency: Measure residency after checking for applicability
@ 2017-10-17 8:49 Chris Wilson
2017-10-17 9:43 ` ✓ Fi.CI.BAT: success for " Patchwork
` (2 more replies)
0 siblings, 3 replies; 5+ messages in thread
From: Chris Wilson @ 2017-10-17 8:49 UTC (permalink / raw)
To: intel-gfx
CI doesn't run in whole-test mode, but runs each subtest individually.
Tests that are designed to do a block of work to be shared between many
subtests end up running that work multiple times (once per subtest) and
worse, that work is wasted if the subtest will be skipped.
pm_rc6_residency is one such example that measured all the residencies
up front before skipping, each skip was therefore taking in excess of
10s.
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
---
tests/pm_rc6_residency.c | 68 ++++++++++++++++++++++++++----------------------
1 file changed, 37 insertions(+), 31 deletions(-)
diff --git a/tests/pm_rc6_residency.c b/tests/pm_rc6_residency.c
index 7c87302d..d6fc4701 100644
--- a/tests/pm_rc6_residency.c
+++ b/tests/pm_rc6_residency.c
@@ -53,11 +53,11 @@ struct residencies {
static unsigned long get_rc6_enabled_mask(void)
{
- unsigned long rc6_mask;
+ unsigned long enabled;
- rc6_mask = 0;
- igt_sysfs_scanf(sysfs, "power/rc6_enable", "%lu", &rc6_mask);
- return rc6_mask;
+ enabled = 0;
+ igt_sysfs_scanf(sysfs, "power/rc6_enable", "%lu", &enabled);
+ return enabled;
}
static unsigned long read_rc6_residency(const char *name)
@@ -85,20 +85,20 @@ static void residency_accuracy(unsigned int diff,
"Sysfs RC6 residency counter is inaccurate.\n");
}
-static void read_residencies(int devid, unsigned int rc6_mask,
+static void read_residencies(int devid, unsigned int mask,
struct residencies *res)
{
- if (rc6_mask & RC6_ENABLED)
+ if (mask & RC6_ENABLED)
res->rc6 = read_rc6_residency("rc6");
- if ((rc6_mask & RC6_ENABLED) &&
+ if ((mask & RC6_ENABLED) &&
(IS_VALLEYVIEW(devid) || IS_CHERRYVIEW(devid)))
res->media_rc6 = read_rc6_residency("media_rc6");
- if (rc6_mask & RC6P_ENABLED)
+ if (mask & RC6P_ENABLED)
res->rc6p = read_rc6_residency("rc6p");
- if (rc6_mask & RC6PP_ENABLED)
+ if (mask & RC6PP_ENABLED)
res->rc6pp = read_rc6_residency("rc6pp");
}
@@ -111,7 +111,7 @@ static unsigned long gettime_ms(void)
return ts.tv_sec * 1000 + ts.tv_nsec / 1000000;
}
-static void measure_residencies(int devid, unsigned int rc6_mask,
+static void measure_residencies(int devid, unsigned int mask,
struct residencies *res)
{
struct residencies start = { };
@@ -119,15 +119,9 @@ static void measure_residencies(int devid, unsigned int rc6_mask,
int retry;
unsigned long t;
- if (!rc6_mask)
+ if (!mask)
return;
- /*
- * For some reason my ivb isn't idle even after syncing up with the gpu.
- * Let's add a sleep just to make it happy.
- */
- sleep(8);
-
/*
* Retry in case of counter wrap-around. We simply re-run the
* measurement, since the valid counter range is different on
@@ -135,9 +129,9 @@ static void measure_residencies(int devid, unsigned int rc6_mask,
*/
for (retry = 0; retry < 2; retry++) {
t = gettime_ms();
- read_residencies(devid, rc6_mask, &start);
+ read_residencies(devid, mask, &start);
sleep(SLEEP_DURATION);
- read_residencies(devid, rc6_mask, &end);
+ read_residencies(devid, mask, &end);
t = gettime_ms() - t;
if (end.rc6 >= start.rc6 && end.media_rc6 >= start.media_rc6 &&
@@ -166,9 +160,8 @@ static void measure_residencies(int devid, unsigned int rc6_mask,
igt_main
{
- unsigned int rc6_mask;
- int devid = 0;
- struct residencies res;
+ unsigned int rc6_enabled = 0;
+ unsigned int devid = 0;
igt_skip_on_simulation();
@@ -181,31 +174,44 @@ igt_main
sysfs = igt_sysfs_open(fd, NULL);
close(fd);
- rc6_mask = get_rc6_enabled_mask();
- igt_require(rc6_mask);
-
- measure_residencies(devid, rc6_mask, &res);
+ rc6_enabled = get_rc6_enabled_mask();
+ igt_require(rc6_enabled);
}
igt_subtest("rc6-accuracy") {
- igt_skip_on(!(rc6_mask & RC6_ENABLED));
+ struct residencies res;
+
+ igt_require(rc6_enabled & RC6_ENABLED);
+ measure_residencies(devid, RC6_ENABLED, &res);
residency_accuracy(res.rc6, res.duration, "rc6");
}
+
igt_subtest("media-rc6-accuracy") {
- igt_skip_on(!((rc6_mask & RC6_ENABLED) &&
- (IS_VALLEYVIEW(devid) || IS_CHERRYVIEW(devid))));
+ struct residencies res;
+ igt_require((rc6_enabled & RC6_ENABLED) &&
+ (IS_VALLEYVIEW(devid) || IS_CHERRYVIEW(devid)));
+
+ measure_residencies(devid, RC6_ENABLED, &res);
residency_accuracy(res.media_rc6, res.duration, "media_rc6");
}
+
igt_subtest("rc6p-accuracy") {
- igt_skip_on(!(rc6_mask & RC6P_ENABLED));
+ struct residencies res;
+
+ igt_require(rc6_enabled & RC6P_ENABLED);
+ measure_residencies(devid, RC6P_ENABLED, &res);
residency_accuracy(res.rc6p, res.duration, "rc6p");
}
+
igt_subtest("rc6pp-accuracy") {
- igt_skip_on(!(rc6_mask & RC6PP_ENABLED));
+ struct residencies res;
+
+ igt_require(rc6_enabled & RC6PP_ENABLED);
+ measure_residencies(devid, RC6PP_ENABLED, &res);
residency_accuracy(res.rc6pp, res.duration, "rc6pp");
}
}
--
2.15.0.rc0
_______________________________________________
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/pm_rc6_residency: Measure residency after checking for applicability
2017-10-17 8:49 [PATCH igt] igt/pm_rc6_residency: Measure residency after checking for applicability Chris Wilson
@ 2017-10-17 9:43 ` Patchwork
2017-10-17 21:34 ` ✓ Fi.CI.IGT: " Patchwork
2017-10-18 9:51 ` [PATCH igt] " Arkadiusz Hiler
2 siblings, 0 replies; 5+ messages in thread
From: Patchwork @ 2017-10-17 9:43 UTC (permalink / raw)
To: Chris Wilson; +Cc: intel-gfx
== Series Details ==
Series: igt/pm_rc6_residency: Measure residency after checking for applicability
URL : https://patchwork.freedesktop.org/series/32097/
State : success
== Summary ==
IGT patchset tested on top of latest successful build
d4d976de7e022cb56a2dbfe96c4ab10549e24acc igt/gem_mocs_settings: Skip non-existent engines
with latest DRM-Tip kernel build CI_DRM_3252
e4dedb9e7c81 drm-tip: 2017y-10m-17d-07h-45m-57s UTC integration manifest
No testlist changes.
Test kms_busy:
Subgroup basic-flip-b:
pass -> FAIL (fi-gdg-551) fdo#102654
Test kms_cursor_legacy:
Subgroup basic-busy-flip-before-cursor-legacy:
pass -> FAIL (fi-gdg-551) fdo#102618
Test kms_pipe_crc_basic:
Subgroup suspend-read-crc-pipe-b:
dmesg-warn -> PASS (fi-byt-j1900) fdo#101705 +1
fdo#102654 https://bugs.freedesktop.org/show_bug.cgi?id=102654
fdo#102618 https://bugs.freedesktop.org/show_bug.cgi?id=102618
fdo#101705 https://bugs.freedesktop.org/show_bug.cgi?id=101705
fi-bdw-5557u total:289 pass:268 dwarn:0 dfail:0 fail:0 skip:21 time:449s
fi-bdw-gvtdvm total:289 pass:265 dwarn:0 dfail:0 fail:0 skip:24 time:450s
fi-blb-e6850 total:289 pass:223 dwarn:1 dfail:0 fail:0 skip:65 time:376s
fi-bsw-n3050 total:289 pass:243 dwarn:0 dfail:0 fail:0 skip:46 time:543s
fi-bwr-2160 total:289 pass:183 dwarn:0 dfail:0 fail:0 skip:106 time:264s
fi-bxt-dsi total:289 pass:259 dwarn:0 dfail:0 fail:0 skip:30 time:501s
fi-bxt-j4205 total:289 pass:260 dwarn:0 dfail:0 fail:0 skip:29 time:504s
fi-byt-j1900 total:289 pass:254 dwarn:0 dfail:0 fail:0 skip:35 time:492s
fi-byt-n2820 total:289 pass:250 dwarn:0 dfail:0 fail:0 skip:39 time:478s
fi-cfl-s total:289 pass:253 dwarn:4 dfail:0 fail:0 skip:32 time:558s
fi-elk-e7500 total:289 pass:229 dwarn:0 dfail:0 fail:0 skip:60 time:417s
fi-gdg-551 total:289 pass:176 dwarn:1 dfail:0 fail:3 skip:109 time:262s
fi-glk-1 total:289 pass:261 dwarn:0 dfail:0 fail:0 skip:28 time:581s
fi-hsw-4770r total:289 pass:262 dwarn:0 dfail:0 fail:0 skip:27 time:422s
fi-ilk-650 total:289 pass:228 dwarn:0 dfail:0 fail:0 skip:61 time:439s
fi-ivb-3520m total:289 pass:260 dwarn:0 dfail:0 fail:0 skip:29 time:482s
fi-ivb-3770 total:289 pass:260 dwarn:0 dfail:0 fail:0 skip:29 time:464s
fi-kbl-7500u total:289 pass:264 dwarn:1 dfail:0 fail:0 skip:24 time:490s
fi-kbl-7560u total:289 pass:270 dwarn:0 dfail:0 fail:0 skip:19 time:572s
fi-kbl-7567u total:289 pass:269 dwarn:0 dfail:0 fail:0 skip:20 time:480s
fi-kbl-r total:289 pass:262 dwarn:0 dfail:0 fail:0 skip:27 time:585s
fi-pnv-d510 total:289 pass:222 dwarn:1 dfail:0 fail:0 skip:66 time:552s
fi-skl-6260u total:289 pass:269 dwarn:0 dfail:0 fail:0 skip:20 time:453s
fi-skl-6700hq total:289 pass:263 dwarn:0 dfail:0 fail:0 skip:26 time:658s
fi-skl-6700k total:289 pass:265 dwarn:0 dfail:0 fail:0 skip:24 time:526s
fi-skl-6770hq total:289 pass:269 dwarn:0 dfail:0 fail:0 skip:20 time:500s
fi-skl-gvtdvm total:289 pass:266 dwarn:0 dfail:0 fail:0 skip:23 time:465s
fi-snb-2520m total:289 pass:250 dwarn:0 dfail:0 fail:0 skip:39 time:569s
fi-snb-2600 total:289 pass:249 dwarn:0 dfail:0 fail:0 skip:40 time:425s
== Logs ==
For more details see: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_366/
_______________________________________________
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/pm_rc6_residency: Measure residency after checking for applicability
2017-10-17 8:49 [PATCH igt] igt/pm_rc6_residency: Measure residency after checking for applicability Chris Wilson
2017-10-17 9:43 ` ✓ Fi.CI.BAT: success for " Patchwork
@ 2017-10-17 21:34 ` Patchwork
2017-10-17 22:16 ` Chris Wilson
2017-10-18 9:51 ` [PATCH igt] " Arkadiusz Hiler
2 siblings, 1 reply; 5+ messages in thread
From: Patchwork @ 2017-10-17 21:34 UTC (permalink / raw)
To: Chris Wilson; +Cc: intel-gfx
== Series Details ==
Series: igt/pm_rc6_residency: Measure residency after checking for applicability
URL : https://patchwork.freedesktop.org/series/32097/
State : success
== Summary ==
Test perf:
Subgroup polling:
fail -> PASS (shard-hsw) fdo#102252
Test gem_sync:
Subgroup basic-many-each:
fail -> PASS (shard-hsw) fdo#100007
fdo#102252 https://bugs.freedesktop.org/show_bug.cgi?id=102252
fdo#100007 https://bugs.freedesktop.org/show_bug.cgi?id=100007
shard-hsw total:2553 pass:1440 dwarn:0 dfail:0 fail:10 skip:1103 time:9242s
== Logs ==
For more details see: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_366/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: ✓ Fi.CI.IGT: success for igt/pm_rc6_residency: Measure residency after checking for applicability
2017-10-17 21:34 ` ✓ Fi.CI.IGT: " Patchwork
@ 2017-10-17 22:16 ` Chris Wilson
0 siblings, 0 replies; 5+ messages in thread
From: Chris Wilson @ 2017-10-17 22:16 UTC (permalink / raw)
To: Patchwork; +Cc: intel-gfx
Quoting Patchwork (2017-10-17 22:34:05)
> == Series Details ==
>
> Series: igt/pm_rc6_residency: Measure residency after checking for applicability
> URL : https://patchwork.freedesktop.org/series/32097/
> State : success
>
> == Summary ==
>
> Test perf:
> Subgroup polling:
> fail -> PASS (shard-hsw) fdo#102252
> Test gem_sync:
> Subgroup basic-many-each:
> fail -> PASS (shard-hsw) fdo#100007
No fails for shaving over 30s off the runtime...
-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
* Re: [PATCH igt] igt/pm_rc6_residency: Measure residency after checking for applicability
2017-10-17 8:49 [PATCH igt] igt/pm_rc6_residency: Measure residency after checking for applicability Chris Wilson
2017-10-17 9:43 ` ✓ Fi.CI.BAT: success for " Patchwork
2017-10-17 21:34 ` ✓ Fi.CI.IGT: " Patchwork
@ 2017-10-18 9:51 ` Arkadiusz Hiler
2 siblings, 0 replies; 5+ messages in thread
From: Arkadiusz Hiler @ 2017-10-18 9:51 UTC (permalink / raw)
To: Chris Wilson; +Cc: intel-gfx
On Tue, Oct 17, 2017 at 09:49:54AM +0100, Chris Wilson wrote:
> CI doesn't run in whole-test mode, but runs each subtest individually.
> Tests that are designed to do a block of work to be shared between many
> subtests end up running that work multiple times (once per subtest) and
> worse, that work is wasted if the subtest will be skipped.
>
> pm_rc6_residency is one such example that measured all the residencies
> up front before skipping, each skip was therefore taking in excess of
> 10s.
>
> Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
Reviewed-by: Arkadiusz Hiler <arkadiusz.hiler@intel.com>
also I've retriggered the other rc6 patch
--
Cheers,
Arek
_______________________________________________
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-10-18 9:51 UTC | newest]
Thread overview: 5+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2017-10-17 8:49 [PATCH igt] igt/pm_rc6_residency: Measure residency after checking for applicability Chris Wilson
2017-10-17 9:43 ` ✓ Fi.CI.BAT: success for " Patchwork
2017-10-17 21:34 ` ✓ Fi.CI.IGT: " Patchwork
2017-10-17 22:16 ` Chris Wilson
2017-10-18 9:51 ` [PATCH igt] " Arkadiusz Hiler
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.