From: "Summers, Stuart" <stuart.summers@intel.com>
To: "intel-gfx@lists.freedesktop.org"
<intel-gfx@lists.freedesktop.org>,
"chris@chris-wilson.co.uk" <chris@chris-wilson.co.uk>
Cc: "igt-dev@lists.freedesktop.org" <igt-dev@lists.freedesktop.org>
Subject: Re: [PATCH i-g-t] i915/gem_ctx_param: Keep the engine active while peeking at vm layout
Date: Mon, 25 Nov 2019 18:45:17 +0000 [thread overview]
Message-ID: <55f0000680207e5f59925a8a74dcaea7397e29ee.camel@intel.com> (raw)
In-Reply-To: <20191124112756.1401928-1-chris@chris-wilson.co.uk>
[-- Attachment #1.1: Type: text/plain, Size: 1844 bytes --]
On Sun, 2019-11-24 at 11:27 +0000, Chris Wilson wrote:
> The implicit soft-pinning we use to probe the vm layout using
> execbuf,
> depends on the batch remaining active (not retired) between execbufs.
> Naturally, if the background retire worker runs the batch is retired
> and
> the implicit soft-pinning is free to use a fresh address.
>
> Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
> ---
> tests/i915/gem_ctx_param.c | 11 +++++++++++
> 1 file changed, 11 insertions(+)
>
> diff --git a/tests/i915/gem_ctx_param.c b/tests/i915/gem_ctx_param.c
> index bd1ee3996..63e0db38d 100644
> --- a/tests/i915/gem_ctx_param.c
> +++ b/tests/i915/gem_ctx_param.c
> @@ -161,6 +161,7 @@ static void test_vm(int i915)
> .param = I915_CONTEXT_PARAM_VM,
> };
> uint32_t parent, child;
> + igt_spin_t *spin;
>
> /*
> * Proving 2 contexts share the same GTT is quite tricky as we
> have no
> @@ -177,6 +178,15 @@ static void test_vm(int i915)
> parent = gem_context_create(i915);
> child = gem_context_create(i915);
>
> + /* Create a background spinner to keep the engines busy */
> + spin = igt_spin_new(i915);
> + for (int i = 0; i < 16; i++) {
Why 16 here?
> + spin->execbuf.rsvd1 = gem_context_create(i915);
> + gem_context_set_priority(i915, spin->execbuf.rsvd1,
> 1023);
Can you make this 1023 a macro?
Thanks,
Stuart
> + gem_execbuf(i915, &spin->execbuf);
> + gem_context_destroy(i915, spin->execbuf.rsvd1);
> + }
> +
> /* Using implicit soft-pinning */
> eb.rsvd1 = parent;
> batch.offset = nonzero_offset;
> @@ -226,6 +236,7 @@ static void test_vm(int i915)
> gem_context_destroy(i915, child);
> gem_vm_destroy(i915, arg.value);
>
> + igt_spin_free(i915, spin);
> gem_sync(i915, batch.handle);
> gem_close(i915, batch.handle);
> }
[-- Attachment #1.2: smime.p7s --]
[-- Type: application/x-pkcs7-signature, Size: 3270 bytes --]
[-- Attachment #2: Type: text/plain, Size: 159 bytes --]
_______________________________________________
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: "Summers, Stuart" <stuart.summers@intel.com>
To: "intel-gfx@lists.freedesktop.org"
<intel-gfx@lists.freedesktop.org>,
"chris@chris-wilson.co.uk" <chris@chris-wilson.co.uk>
Cc: "igt-dev@lists.freedesktop.org" <igt-dev@lists.freedesktop.org>
Subject: Re: [Intel-gfx] [PATCH i-g-t] i915/gem_ctx_param: Keep the engine active while peeking at vm layout
Date: Mon, 25 Nov 2019 18:45:17 +0000 [thread overview]
Message-ID: <55f0000680207e5f59925a8a74dcaea7397e29ee.camel@intel.com> (raw)
Message-ID: <20191125184517.dUnnvWbQdqfOTvTpZ36mngRNJS4-T8Xj7mko1z55Tjc@z> (raw)
In-Reply-To: <20191124112756.1401928-1-chris@chris-wilson.co.uk>
[-- Attachment #1.1: Type: text/plain, Size: 1844 bytes --]
On Sun, 2019-11-24 at 11:27 +0000, Chris Wilson wrote:
> The implicit soft-pinning we use to probe the vm layout using
> execbuf,
> depends on the batch remaining active (not retired) between execbufs.
> Naturally, if the background retire worker runs the batch is retired
> and
> the implicit soft-pinning is free to use a fresh address.
>
> Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
> ---
> tests/i915/gem_ctx_param.c | 11 +++++++++++
> 1 file changed, 11 insertions(+)
>
> diff --git a/tests/i915/gem_ctx_param.c b/tests/i915/gem_ctx_param.c
> index bd1ee3996..63e0db38d 100644
> --- a/tests/i915/gem_ctx_param.c
> +++ b/tests/i915/gem_ctx_param.c
> @@ -161,6 +161,7 @@ static void test_vm(int i915)
> .param = I915_CONTEXT_PARAM_VM,
> };
> uint32_t parent, child;
> + igt_spin_t *spin;
>
> /*
> * Proving 2 contexts share the same GTT is quite tricky as we
> have no
> @@ -177,6 +178,15 @@ static void test_vm(int i915)
> parent = gem_context_create(i915);
> child = gem_context_create(i915);
>
> + /* Create a background spinner to keep the engines busy */
> + spin = igt_spin_new(i915);
> + for (int i = 0; i < 16; i++) {
Why 16 here?
> + spin->execbuf.rsvd1 = gem_context_create(i915);
> + gem_context_set_priority(i915, spin->execbuf.rsvd1,
> 1023);
Can you make this 1023 a macro?
Thanks,
Stuart
> + gem_execbuf(i915, &spin->execbuf);
> + gem_context_destroy(i915, spin->execbuf.rsvd1);
> + }
> +
> /* Using implicit soft-pinning */
> eb.rsvd1 = parent;
> batch.offset = nonzero_offset;
> @@ -226,6 +236,7 @@ static void test_vm(int i915)
> gem_context_destroy(i915, child);
> gem_vm_destroy(i915, arg.value);
>
> + igt_spin_free(i915, spin);
> gem_sync(i915, batch.handle);
> gem_close(i915, batch.handle);
> }
[-- Attachment #1.2: smime.p7s --]
[-- Type: application/x-pkcs7-signature, Size: 3270 bytes --]
[-- Attachment #2: Type: text/plain, Size: 159 bytes --]
_______________________________________________
Intel-gfx mailing list
Intel-gfx@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/intel-gfx
next prev parent reply other threads:[~2019-11-25 18:45 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2019-11-24 11:27 [PATCH i-g-t] i915/gem_ctx_param: Keep the engine active while peeking at vm layout Chris Wilson
2019-11-24 11:27 ` [Intel-gfx] " Chris Wilson
2019-11-25 18:45 ` Summers, Stuart [this message]
2019-11-25 18:45 ` Summers, Stuart
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=55f0000680207e5f59925a8a74dcaea7397e29ee.camel@intel.com \
--to=stuart.summers@intel.com \
--cc=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: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox