public inbox for igt-dev@lists.freedesktop.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] i915/gem_ppgtt: Convert stress test to run for a fixed duration
Date: Fri, 11 Jan 2019 13:40:36 +0000	[thread overview]
Message-ID: <7a28c6d1-78e2-89b5-e321-253bb820b8cf@linux.intel.com> (raw)
In-Reply-To: <20190108145049.6556-1-chris@chris-wilson.co.uk>


On 08/01/2019 14:50, Chris Wilson wrote:
> Currently blt-vs-render runs for a fixed loop count, and exceeds 360s
> on a slow Skylake-y. It really doesn't tell us anything useful about low
> likelihood events after the first few seconds it takes to fill memory,
> so limit it to 30s (and hope that repeated runs in CI is enough to
> exercise the even rarer corner cases).
> 
> Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=108039
> Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
> ---
>   tests/i915/gem_ppgtt.c | 55 ++++++++++++++++++++++++++++++------------
>   1 file changed, 39 insertions(+), 16 deletions(-)
> 
> diff --git a/tests/i915/gem_ppgtt.c b/tests/i915/gem_ppgtt.c
> index c2e4ca679..11ca31e74 100644
> --- a/tests/i915/gem_ppgtt.c
> +++ b/tests/i915/gem_ppgtt.c
> @@ -85,7 +85,9 @@ static void scratch_buf_fini(struct igt_buf *buf)
>   	memset(buf, 0, sizeof(*buf));
>   }
>   
> -static void fork_rcs_copy(int target, drm_intel_bo **dst, int count, unsigned flags)
> +static void fork_rcs_copy(int timeout, uint32_t final,
> +			  drm_intel_bo **dst, int count,
> +			  unsigned flags)
>   #define CREATE_CONTEXT 0x1
>   {
>   	igt_render_copyfunc_t render_copy;
> @@ -117,6 +119,8 @@ static void fork_rcs_copy(int target, drm_intel_bo **dst, int count, unsigned fl
>   	igt_fork(child, count) {
>   		struct intel_batchbuffer *batch;
>   		struct igt_buf buf = {};
> +		struct igt_buf src;
> +		unsigned long i;
>   
>   		batch = intel_batchbuffer_alloc(dst[child]->bufmgr,
>   						devid);
> @@ -135,23 +139,29 @@ static void fork_rcs_copy(int target, drm_intel_bo **dst, int count, unsigned fl
>   		buf.size = SIZE;
>   		buf.bpp = 32;
>   
> -		for (int i = 0; i <= target; i++) {
> -			struct igt_buf src;
> -
> +		i = 0;
> +		igt_until_timeout(timeout) {
>   			scratch_buf_init(&src, dst[child]->bufmgr,
> -					 i | child << 16);
> -
> +					 i++ | child << 16);
>   			render_copy(batch, NULL,
>   				    &src, 0, 0,
>   				    WIDTH, HEIGHT,
>   				    &buf, 0, 0);
> -
>   			scratch_buf_fini(&src);
>   		}
> +
> +		scratch_buf_init(&src, dst[child]->bufmgr,
> +				 final | child << 16);
> +		render_copy(batch, NULL,
> +			    &src, 0, 0,
> +			    WIDTH, HEIGHT,
> +			    &buf, 0, 0);
> +		scratch_buf_fini(&src);
>   	}
>   }
>   
> -static void fork_bcs_copy(int target, drm_intel_bo **dst, int count)
> +static void fork_bcs_copy(int timeout, uint32_t final,
> +			  drm_intel_bo **dst, int count)
>   {
>   	int devid;
>   
> @@ -169,18 +179,20 @@ static void fork_bcs_copy(int target, drm_intel_bo **dst, int count)
>   
>   	igt_fork(child, count) {
>   		struct intel_batchbuffer *batch;
> +		drm_intel_bo *src[2];
> +		unsigned long i;
> +
>   
>   		batch = intel_batchbuffer_alloc(dst[child]->bufmgr,
>   						devid);
>   		igt_assert(batch);
>   
> -		for (int i = 0; i <= target; i++) {
> -			drm_intel_bo *src[2];
> -
> +		i = 0;
> +		igt_until_timeout(timeout) {
>   			src[0] = create_bo(dst[child]->bufmgr,
>   					   ~0);
>   			src[1] = create_bo(dst[child]->bufmgr,
> -					   i | child << 16);
> +					   i++ | child << 16);
>   
>   			intel_copy_bo(batch, src[0], src[1], SIZE);
>   			intel_copy_bo(batch, dst[child], src[0], SIZE);
> @@ -188,6 +200,17 @@ static void fork_bcs_copy(int target, drm_intel_bo **dst, int count)
>   			drm_intel_bo_unreference(src[1]);
>   			drm_intel_bo_unreference(src[0]);
>   		}
> +
> +		src[0] = create_bo(dst[child]->bufmgr,
> +				   ~0);
> +		src[1] = create_bo(dst[child]->bufmgr,
> +				   final | child << 16);
> +
> +		intel_copy_bo(batch, src[0], src[1], SIZE);
> +		intel_copy_bo(batch, dst[child], src[0], SIZE);
> +
> +		drm_intel_bo_unreference(src[1]);
> +		drm_intel_bo_unreference(src[0]);
>   	}
>   }
>   
> @@ -314,8 +337,8 @@ int main(int argc, char **argv)
>   	igt_subtest("blt-vs-render-ctx0") {
>   		drm_intel_bo *bcs[1], *rcs[N_CHILD];
>   
> -		fork_bcs_copy(0x4000, bcs, 1);
> -		fork_rcs_copy(0x8000 / N_CHILD, rcs, N_CHILD, 0);
> +		fork_bcs_copy(30, 0x4000, bcs, 1);
> +		fork_rcs_copy(30, 0x8000 / N_CHILD, rcs, N_CHILD, 0);
>   
>   		igt_waitchildren();
>   
> @@ -326,8 +349,8 @@ int main(int argc, char **argv)
>   	igt_subtest("blt-vs-render-ctxN") {
>   		drm_intel_bo *bcs[1], *rcs[N_CHILD];
>   
> -		fork_rcs_copy(0x8000 / N_CHILD, rcs, N_CHILD, CREATE_CONTEXT);
> -		fork_bcs_copy(0x4000, bcs, 1);
> +		fork_rcs_copy(30, 0x8000 / N_CHILD, rcs, N_CHILD, CREATE_CONTEXT);
> +		fork_bcs_copy(30, 0x4000, bcs, 1);
>   
>   		igt_waitchildren();
>   
> 

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

      parent reply	other threads:[~2019-01-11 13:40 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2019-01-08 14:50 [igt-dev] [PATCH i-g-t] i915/gem_ppgtt: Convert stress test to run for a fixed duration Chris Wilson
2019-01-08 15:01 ` [igt-dev] ✗ Fi.CI.BAT: failure for " Patchwork
2019-01-08 16:15 ` [igt-dev] ✓ Fi.CI.BAT: success for i915/gem_ppgtt: Convert stress test to run for a fixed duration (rev2) Patchwork
2019-01-08 23:31 ` [igt-dev] ✓ Fi.CI.IGT: " Patchwork
2019-01-11 13:40 ` Tvrtko Ursulin [this message]

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=7a28c6d1-78e2-89b5-e321-253bb820b8cf@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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox