All of lore.kernel.org
 help / color / mirror / Atom feed
From: Tvrtko Ursulin <tvrtko.ursulin@linux.intel.com>
To: Chris Wilson <chris@chris-wilson.co.uk>, intel-gfx@lists.freedesktop.org
Cc: igt-dev@lists.freedesktop.org
Subject: Re: [igt-dev] [PATCH i-g-t] igt/gem_eio: Preserve batch between reset-stress iterations
Date: Wed, 8 Aug 2018 13:38:53 +0100	[thread overview]
Message-ID: <9178642d-6973-3592-fb9c-ded7f8d2c62f@linux.intel.com> (raw)
In-Reply-To: <20180808113137.3747-1-chris@chris-wilson.co.uk>


On 08/08/2018 12:31, Chris Wilson wrote:
> We can keep the original batch around and avoid recreating it between
> reset iterations to focus on the impact of resets.
> 
> Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
> Cc: Tvrtko Ursulin <tvrtko.ursulin@linux.intel.com>
> ---
>   tests/gem_eio.c | 30 +++++++++++++++++-------------
>   1 file changed, 17 insertions(+), 13 deletions(-)
> 
> diff --git a/tests/gem_eio.c b/tests/gem_eio.c
> index de161332d..5250a414c 100644
> --- a/tests/gem_eio.c
> +++ b/tests/gem_eio.c
> @@ -650,35 +650,38 @@ static void reset_stress(int fd,
>   			 uint32_t ctx0, unsigned int engine,
>   			 unsigned int flags)
>   {
> +	const uint32_t bbe = MI_BATCH_BUFFER_END;
> +	struct drm_i915_gem_exec_object2 obj = {
> +		.handle = gem_create(fd, 4096)
> +	};
> +	struct drm_i915_gem_execbuffer2 execbuf = {
> +		.buffers_ptr = to_user_pointer(&obj),
> +		.buffer_count = 1,
> +		.flags = engine,
> +	};
> +	gem_write(fd, obj.handle, 0, &bbe, sizeof(bbe));
> +
>   	igt_until_timeout(5) {
> -		struct drm_i915_gem_execbuffer2 execbuf = { };
> -		struct drm_i915_gem_exec_object2 obj = { };
> -		uint32_t bbe = MI_BATCH_BUFFER_END;
> +		uint32_t ctx = context_create_safe(fd);

There is still this per loop...

>   		igt_spin_t *hang;
>   		unsigned int i;
> -		uint32_t ctx;
>   
>   		gem_quiescent_gpu(fd);
>   
>   		igt_require(i915_reset_control(flags & TEST_WEDGE ?
>   					       false : true));
>   
> -		ctx = context_create_safe(fd);
> -
>   		/*
>   		 * Start executing a spin batch with some queued batches
>   		 * against a different context after it.
>   		 */
>   		hang = spin_sync(fd, ctx0, engine);

... and a ton of operations in this one, so I wonder why bother with one 
batch?

>   
> -		obj.handle = gem_create(fd, 4096);
> -		gem_write(fd, obj.handle, 0, &bbe, sizeof(bbe));
> +		execbuf.rsvd1 = ctx;
> +		for (i = 0; i < 10; i++)
> +			gem_execbuf(fd, &execbuf);
>   
> -		execbuf.buffers_ptr = to_user_pointer(&obj);
> -		execbuf.buffer_count = 1;
>   		execbuf.rsvd1 = ctx0;
> -		execbuf.flags = engine;
> -
>   		for (i = 0; i < 10; i++)
>   			gem_execbuf(fd, &execbuf);
>   
> @@ -706,8 +709,9 @@ static void reset_stress(int fd,
>   		gem_sync(fd, obj.handle);
>   		igt_spin_batch_free(fd, hang);
>   		gem_context_destroy(fd, ctx);
> -		gem_close(fd, obj.handle);
>   	}
> +
> +	gem_close(fd, obj.handle);
>   }
>   
>   /*
> 

But anyway - no technical complaints:

Reviewed-by: Tvrtko Ursulin <tvrtko.ursulin@intel.com>

Regards,

Tvrtko
_______________________________________________
igt-dev mailing list
igt-dev@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/igt-dev

WARNING: multiple messages have this Message-ID (diff)
From: Tvrtko Ursulin <tvrtko.ursulin@linux.intel.com>
To: Chris Wilson <chris@chris-wilson.co.uk>, intel-gfx@lists.freedesktop.org
Cc: igt-dev@lists.freedesktop.org
Subject: Re: [PATCH i-g-t] igt/gem_eio: Preserve batch between reset-stress iterations
Date: Wed, 8 Aug 2018 13:38:53 +0100	[thread overview]
Message-ID: <9178642d-6973-3592-fb9c-ded7f8d2c62f@linux.intel.com> (raw)
In-Reply-To: <20180808113137.3747-1-chris@chris-wilson.co.uk>


On 08/08/2018 12:31, Chris Wilson wrote:
> We can keep the original batch around and avoid recreating it between
> reset iterations to focus on the impact of resets.
> 
> Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
> Cc: Tvrtko Ursulin <tvrtko.ursulin@linux.intel.com>
> ---
>   tests/gem_eio.c | 30 +++++++++++++++++-------------
>   1 file changed, 17 insertions(+), 13 deletions(-)
> 
> diff --git a/tests/gem_eio.c b/tests/gem_eio.c
> index de161332d..5250a414c 100644
> --- a/tests/gem_eio.c
> +++ b/tests/gem_eio.c
> @@ -650,35 +650,38 @@ static void reset_stress(int fd,
>   			 uint32_t ctx0, unsigned int engine,
>   			 unsigned int flags)
>   {
> +	const uint32_t bbe = MI_BATCH_BUFFER_END;
> +	struct drm_i915_gem_exec_object2 obj = {
> +		.handle = gem_create(fd, 4096)
> +	};
> +	struct drm_i915_gem_execbuffer2 execbuf = {
> +		.buffers_ptr = to_user_pointer(&obj),
> +		.buffer_count = 1,
> +		.flags = engine,
> +	};
> +	gem_write(fd, obj.handle, 0, &bbe, sizeof(bbe));
> +
>   	igt_until_timeout(5) {
> -		struct drm_i915_gem_execbuffer2 execbuf = { };
> -		struct drm_i915_gem_exec_object2 obj = { };
> -		uint32_t bbe = MI_BATCH_BUFFER_END;
> +		uint32_t ctx = context_create_safe(fd);

There is still this per loop...

>   		igt_spin_t *hang;
>   		unsigned int i;
> -		uint32_t ctx;
>   
>   		gem_quiescent_gpu(fd);
>   
>   		igt_require(i915_reset_control(flags & TEST_WEDGE ?
>   					       false : true));
>   
> -		ctx = context_create_safe(fd);
> -
>   		/*
>   		 * Start executing a spin batch with some queued batches
>   		 * against a different context after it.
>   		 */
>   		hang = spin_sync(fd, ctx0, engine);

... and a ton of operations in this one, so I wonder why bother with one 
batch?

>   
> -		obj.handle = gem_create(fd, 4096);
> -		gem_write(fd, obj.handle, 0, &bbe, sizeof(bbe));
> +		execbuf.rsvd1 = ctx;
> +		for (i = 0; i < 10; i++)
> +			gem_execbuf(fd, &execbuf);
>   
> -		execbuf.buffers_ptr = to_user_pointer(&obj);
> -		execbuf.buffer_count = 1;
>   		execbuf.rsvd1 = ctx0;
> -		execbuf.flags = engine;
> -
>   		for (i = 0; i < 10; i++)
>   			gem_execbuf(fd, &execbuf);
>   
> @@ -706,8 +709,9 @@ static void reset_stress(int fd,
>   		gem_sync(fd, obj.handle);
>   		igt_spin_batch_free(fd, hang);
>   		gem_context_destroy(fd, ctx);
> -		gem_close(fd, obj.handle);
>   	}
> +
> +	gem_close(fd, obj.handle);
>   }
>   
>   /*
> 

But anyway - no technical complaints:

Reviewed-by: Tvrtko Ursulin <tvrtko.ursulin@intel.com>

Regards,

Tvrtko
_______________________________________________
Intel-gfx mailing list
Intel-gfx@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/intel-gfx

  reply	other threads:[~2018-08-08 12:38 UTC|newest]

Thread overview: 12+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2018-08-08 11:31 [igt-dev] [PATCH i-g-t] igt/gem_eio: Preserve batch between reset-stress iterations Chris Wilson
2018-08-08 11:31 ` Chris Wilson
2018-08-08 12:38 ` Tvrtko Ursulin [this message]
2018-08-08 12:38   ` Tvrtko Ursulin
2018-08-08 12:47   ` [igt-dev] " Chris Wilson
2018-08-08 12:47     ` Chris Wilson
2018-08-08 12:57     ` [Intel-gfx] " Tvrtko Ursulin
2018-08-08 12:57       ` Tvrtko Ursulin
2018-08-08 14:19       ` [igt-dev] " Chris Wilson
2018-08-08 14:19         ` Chris Wilson
2018-08-08 12:58 ` [igt-dev] ✓ Fi.CI.BAT: success for " Patchwork
2018-08-08 18:15 ` [igt-dev] ✗ Fi.CI.IGT: failure " 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=9178642d-6973-3592-fb9c-ded7f8d2c62f@linux.intel.com \
    --to=tvrtko.ursulin@linux.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 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.