* [Intel-gfx] [PATCH i-g-t] i915/i915_pm_rc6_residency: Show where the time is spent
@ 2020-04-08 12:59 Chris Wilson
2020-04-09 20:43 ` Andi Shyti
0 siblings, 1 reply; 2+ messages in thread
From: Chris Wilson @ 2020-04-08 12:59 UTC (permalink / raw)
To: intel-gfx; +Cc: igt-dev, Chris Wilson
Sometimes the bg_load only wakes up once or twice in 3s. That's
just unbelievable, so include some measurements to see how long the
load spends in submission & waiting.
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
---
tests/i915/i915_pm_rc6_residency.c | 12 +++++++++++-
1 file changed, 11 insertions(+), 1 deletion(-)
diff --git a/tests/i915/i915_pm_rc6_residency.c b/tests/i915/i915_pm_rc6_residency.c
index cd1a6c8d6..15efba186 100644
--- a/tests/i915/i915_pm_rc6_residency.c
+++ b/tests/i915/i915_pm_rc6_residency.c
@@ -304,11 +304,13 @@ static void bg_load(int i915, unsigned int flags, unsigned long *ctl)
sigaction(SIGINT, &act, NULL);
do {
+ uint64_t submit, wait, elapsed;
struct timespec tv = {};
igt_nsec_elapsed(&tv);
gem_execbuf(i915, &execbuf);
+ submit = igt_nsec_elapsed(&tv);
if (flags & WAITBOOST) {
gem_sync(i915, obj.handle);
if (flags & ONCE)
@@ -317,6 +319,7 @@ static void bg_load(int i915, unsigned int flags, unsigned long *ctl)
while (gem_bo_busy(i915, obj.handle))
usleep(0);
}
+ wait = igt_nsec_elapsed(&tv);
ctl[1]++;
/*
@@ -330,8 +333,15 @@ static void bg_load(int i915, unsigned int flags, unsigned long *ctl)
if (!gem_has_execlists(i915))
igt_drop_caches_set(i915, DROP_IDLE);
+ elapsed = igt_nsec_elapsed(&tv);
+ igt_info("Pulse took %.3fms (submit %.1fus, wait %.1fus, idle %.1fus)\n",
+ 1e-6 * elapsed,
+ 1e-3 * submit,
+ 1e-3 * (wait - submit),
+ 1e-3 * (elapsed - wait));
+
/* aim for ~1% busy */
- usleep(min(igt_nsec_elapsed(&tv) / 10, 50 * 1000));
+ usleep(min(elapsed / 10, 50 * 1000));
} while (!READ_ONCE(*ctl));
}
--
2.26.0
_______________________________________________
Intel-gfx mailing list
Intel-gfx@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/intel-gfx
^ permalink raw reply related [flat|nested] 2+ messages in thread
* Re: [Intel-gfx] [PATCH i-g-t] i915/i915_pm_rc6_residency: Show where the time is spent
2020-04-08 12:59 [Intel-gfx] [PATCH i-g-t] i915/i915_pm_rc6_residency: Show where the time is spent Chris Wilson
@ 2020-04-09 20:43 ` Andi Shyti
0 siblings, 0 replies; 2+ messages in thread
From: Andi Shyti @ 2020-04-09 20:43 UTC (permalink / raw)
To: Chris Wilson; +Cc: igt-dev, intel-gfx
Hi Chris,
On Wed, Apr 08, 2020 at 01:59:46PM +0100, Chris Wilson wrote:
> Sometimes the bg_load only wakes up once or twice in 3s. That's
> just unbelievable, so include some measurements to see how long the
> load spends in submission & waiting.
>
> Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
Reviewed-by: Andi Shyti <andi.shyti@intel.com>
Andi
_______________________________________________
Intel-gfx mailing list
Intel-gfx@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/intel-gfx
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2020-04-09 20:43 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2020-04-08 12:59 [Intel-gfx] [PATCH i-g-t] i915/i915_pm_rc6_residency: Show where the time is spent Chris Wilson
2020-04-09 20:43 ` Andi Shyti
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox