From: Chris Wilson <chris@chris-wilson.co.uk> To: intel-gfx@lists.freedesktop.org Cc: igt-dev@lists.freedesktop.org Subject: [PATCH i-g-t 4/8] i915/gem_exec_latency: Eliminate the wakeup penalty Date: Wed, 30 Jan 2019 09:54:56 +0000 [thread overview] Message-ID: <20190130095500.23596-4-chris@chris-wilson.co.uk> (raw) In-Reply-To: <20190130095500.23596-1-chris@chris-wilson.co.uk> The first dispatch incurs the cost of waking up the device, so also measure after issuing a spinner to keep the device awake as we submit. Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk> --- tests/i915/gem_exec_latency.c | 19 +++++++++++++++++-- 1 file changed, 17 insertions(+), 2 deletions(-) diff --git a/tests/i915/gem_exec_latency.c b/tests/i915/gem_exec_latency.c index b16b25e53..e726385bd 100644 --- a/tests/i915/gem_exec_latency.c +++ b/tests/i915/gem_exec_latency.c @@ -55,8 +55,9 @@ #define ENGINE_FLAGS (I915_EXEC_RING_MASK | LOCAL_I915_EXEC_BSD_MASK) -#define CORK 0x1 -#define PREEMPT 0x2 +#define LIVE 0x1 +#define CORK 0x2 +#define PREEMPT 0x4 static unsigned int ring_size; static double rcs_clock; @@ -120,6 +121,7 @@ static void latency_on_ring(int fd, struct drm_i915_gem_exec_object2 obj[3]; struct drm_i915_gem_relocation_entry reloc; struct drm_i915_gem_execbuffer2 execbuf; + igt_spin_t *spin = NULL; IGT_CORK_HANDLE(c); volatile uint32_t *reg; unsigned repeats = ring_size; @@ -189,6 +191,9 @@ static void latency_on_ring(int fd, execbuf.buffer_count = 3; } + if (flags & LIVE) + spin = igt_spin_batch_new(fd, .engine = ring); + start = *reg; for (j = 0; j < repeats; j++) { uint64_t presumed_offset = reloc.presumed_offset; @@ -204,6 +209,7 @@ static void latency_on_ring(int fd, end = *reg; igt_assert(reloc.presumed_offset == obj[1].offset); + igt_spin_batch_free(fd, spin); if (flags & CORK) igt_cork_unplug(&c); @@ -696,6 +702,11 @@ igt_main e->exec_id | e->flags, e->name, 0); + igt_subtest_f("%s-live-dispatch", e->name) + latency_on_ring(device, + e->exec_id | e->flags, + e->name, LIVE); + igt_subtest_f("%s-poll", e->name) poll_ring(device, e->exec_id | e->flags, @@ -715,6 +726,10 @@ igt_main e->name, 0); + igt_subtest_f("%s-live-dispatch-queued", e->name) + latency_on_ring(device, + e->exec_id | e->flags, + e->name, LIVE | CORK); igt_subtest_f("%s-dispatch-queued", e->name) latency_on_ring(device, e->exec_id | e->flags, -- 2.20.1 _______________________________________________ Intel-gfx mailing list Intel-gfx@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/intel-gfx
WARNING: multiple messages have this Message-ID (diff)
From: Chris Wilson <chris@chris-wilson.co.uk> To: intel-gfx@lists.freedesktop.org Cc: igt-dev@lists.freedesktop.org Subject: [igt-dev] [PATCH i-g-t 4/8] i915/gem_exec_latency: Eliminate the wakeup penalty Date: Wed, 30 Jan 2019 09:54:56 +0000 [thread overview] Message-ID: <20190130095500.23596-4-chris@chris-wilson.co.uk> (raw) In-Reply-To: <20190130095500.23596-1-chris@chris-wilson.co.uk> The first dispatch incurs the cost of waking up the device, so also measure after issuing a spinner to keep the device awake as we submit. Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk> --- tests/i915/gem_exec_latency.c | 19 +++++++++++++++++-- 1 file changed, 17 insertions(+), 2 deletions(-) diff --git a/tests/i915/gem_exec_latency.c b/tests/i915/gem_exec_latency.c index b16b25e53..e726385bd 100644 --- a/tests/i915/gem_exec_latency.c +++ b/tests/i915/gem_exec_latency.c @@ -55,8 +55,9 @@ #define ENGINE_FLAGS (I915_EXEC_RING_MASK | LOCAL_I915_EXEC_BSD_MASK) -#define CORK 0x1 -#define PREEMPT 0x2 +#define LIVE 0x1 +#define CORK 0x2 +#define PREEMPT 0x4 static unsigned int ring_size; static double rcs_clock; @@ -120,6 +121,7 @@ static void latency_on_ring(int fd, struct drm_i915_gem_exec_object2 obj[3]; struct drm_i915_gem_relocation_entry reloc; struct drm_i915_gem_execbuffer2 execbuf; + igt_spin_t *spin = NULL; IGT_CORK_HANDLE(c); volatile uint32_t *reg; unsigned repeats = ring_size; @@ -189,6 +191,9 @@ static void latency_on_ring(int fd, execbuf.buffer_count = 3; } + if (flags & LIVE) + spin = igt_spin_batch_new(fd, .engine = ring); + start = *reg; for (j = 0; j < repeats; j++) { uint64_t presumed_offset = reloc.presumed_offset; @@ -204,6 +209,7 @@ static void latency_on_ring(int fd, end = *reg; igt_assert(reloc.presumed_offset == obj[1].offset); + igt_spin_batch_free(fd, spin); if (flags & CORK) igt_cork_unplug(&c); @@ -696,6 +702,11 @@ igt_main e->exec_id | e->flags, e->name, 0); + igt_subtest_f("%s-live-dispatch", e->name) + latency_on_ring(device, + e->exec_id | e->flags, + e->name, LIVE); + igt_subtest_f("%s-poll", e->name) poll_ring(device, e->exec_id | e->flags, @@ -715,6 +726,10 @@ igt_main e->name, 0); + igt_subtest_f("%s-live-dispatch-queued", e->name) + latency_on_ring(device, + e->exec_id | e->flags, + e->name, LIVE | CORK); igt_subtest_f("%s-dispatch-queued", e->name) latency_on_ring(device, e->exec_id | e->flags, -- 2.20.1 _______________________________________________ igt-dev mailing list igt-dev@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/igt-dev
next prev parent reply other threads:[~2019-01-30 9:54 UTC|newest] Thread overview: 24+ messages / expand[flat|nested] mbox.gz Atom feed top 2019-01-30 9:54 [PATCH i-g-t 1/8] lib: Skip unused fork helpers Chris Wilson 2019-01-30 9:54 ` [igt-dev] " Chris Wilson 2019-01-30 9:54 ` [PATCH i-g-t 2/8] i915/gem_eio: Check for allow-hang prior to issuing a reset Chris Wilson 2019-01-30 9:54 ` [igt-dev] " Chris Wilson 2019-01-30 11:08 ` Mika Kuoppala 2019-01-30 11:08 ` [igt-dev] [Intel-gfx] " Mika Kuoppala 2019-01-30 9:54 ` [PATCH i-g-t 3/8] i915/gem_exec_latency: Normalize results into ns Chris Wilson 2019-01-30 9:54 ` [Intel-gfx] " Chris Wilson 2019-01-30 9:54 ` Chris Wilson [this message] 2019-01-30 9:54 ` [igt-dev] [PATCH i-g-t 4/8] i915/gem_exec_latency: Eliminate the wakeup penalty Chris Wilson 2019-01-30 9:54 ` [PATCH i-g-t 5/8] i915/gem_exec_schedule: Verify that using HW semaphores doesn't block Chris Wilson 2019-01-30 9:54 ` [Intel-gfx] " Chris Wilson 2019-01-30 9:54 ` [PATCH i-g-t 6/8] i915/gem_exec_nop: poll-sequential requires ordering between rings Chris Wilson 2019-01-30 9:54 ` [igt-dev] " Chris Wilson 2019-01-30 9:54 ` [PATCH i-g-t 7/8] i915/gem_sync: Make switch-default asymmetric Chris Wilson 2019-01-30 9:54 ` [igt-dev] " Chris Wilson 2019-01-30 9:55 ` [PATCH i-g-t 8/8] intel-ci: Drop gem_exec_nop from BAT Chris Wilson 2019-01-30 9:55 ` [igt-dev] " Chris Wilson 2019-01-30 11:12 ` Mika Kuoppala 2019-01-30 11:12 ` [igt-dev] [Intel-gfx] " Mika Kuoppala 2019-01-30 10:50 ` [igt-dev] ✓ Fi.CI.BAT: success for series starting with [i-g-t,1/8] lib: Skip unused fork helpers Patchwork 2019-01-30 11:07 ` [PATCH i-g-t 1/8] " Mika Kuoppala 2019-01-30 11:07 ` [igt-dev] [Intel-gfx] " Mika Kuoppala 2019-01-30 12:47 ` [igt-dev] ✓ Fi.CI.IGT: success for series starting with [i-g-t,1/8] " Patchwork
Reply instructions: You may reply publicly to this message via plain-text email using any one of the following methods: * Save the following mbox file, import it into your mail client, and reply-to-all from there: mbox Avoid top-posting and favor interleaved quoting: https://en.wikipedia.org/wiki/Posting_style#Interleaved_style * Reply using the --to, --cc, and --in-reply-to switches of git-send-email(1): git send-email \ --in-reply-to=20190130095500.23596-4-chris@chris-wilson.co.uk \ --to=chris@chris-wilson.co.uk \ --cc=igt-dev@lists.freedesktop.org \ --cc=intel-gfx@lists.freedesktop.org \ /path/to/YOUR_REPLY https://kernel.org/pub/software/scm/git/docs/git-send-email.html * If your mail client supports setting the In-Reply-To header via mailto: links, try the mailto: linkBe sure your reply has a Subject: header at the top and a blank line before the message body.
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.