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: [Intel-gfx] [igt-dev] [PATCH i-g-t] i915/gem_softpin: Replace constant loop with timeout
Date: Mon, 7 Oct 2019 17:58:17 +0100	[thread overview]
Message-ID: <05edf2d4-d0d2-9b06-4037-40380035ef15@linux.intel.com> (raw)
In-Reply-To: <20191005081523.27340-1-chris@chris-wilson.co.uk>


On 05/10/2019 09:15, Chris Wilson wrote:
> Rather than do a fixed amount of work that takes *forever*, run for a
> fixed amount of time.
> 
> Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
> ---
>   tests/i915/gem_softpin.c | 6 ++++--
>   1 file changed, 4 insertions(+), 2 deletions(-)
> 
> diff --git a/tests/i915/gem_softpin.c b/tests/i915/gem_softpin.c
> index c29097ad3..032056c08 100644
> --- a/tests/i915/gem_softpin.c
> +++ b/tests/i915/gem_softpin.c
> @@ -102,14 +102,14 @@ static void test_softpin(int fd)
>   	struct drm_i915_gem_exec_object2 object;
>   	uint64_t offset, end;
>   	uint32_t last_handle;
> -	int loop;
> +	unsigned long count = 0;
>   
>   	last_handle = gem_create(fd, size);
>   
>   	memset(&execbuf, 0, sizeof(execbuf));
>   	execbuf.buffers_ptr = to_user_pointer(&object);
>   	execbuf.buffer_count = 1;
> -	for (loop = 0; loop < 1024; loop++) {
> +	igt_until_timeout(30) {
>   		memset(&object, 0, sizeof(object));
>   		object.handle = gem_create(fd, 2*size);
>   		gem_write(fd, object.handle, 0, &bbe, sizeof(bbe));
> @@ -134,7 +134,9 @@ static void test_softpin(int fd)
>   		}
>   
>   		last_handle = object.handle;
> +		count++;
>   	}
> +	igt_info("Completd %lu cycles\n", count);
>   }
>   
>   static void test_overlap(int fd)
> 

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

      parent reply	other threads:[~2019-10-07 16:58 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2019-10-05  8:15 [igt-dev] [PATCH i-g-t] i915/gem_softpin: Replace constant loop with timeout Chris Wilson
2019-10-05  9:22 ` [igt-dev] ✗ Fi.CI.BAT: failure for " Patchwork
2019-10-07 16:58 ` 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=05edf2d4-d0d2-9b06-4037-40380035ef15@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