From: Mika Kuoppala <mika.kuoppala@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] [Intel-gfx] [PATCH i-g-t] i915/gem_exec_create: Trim loop counters
Date: Tue, 03 Mar 2020 16:34:09 +0200 [thread overview]
Message-ID: <87o8td5wym.fsf@gaia.fi.intel.com> (raw)
In-Reply-To: <20200303141842.1575190-1-chris@chris-wilson.co.uk>
Chris Wilson <chris@chris-wilson.co.uk> writes:
> gem_create + gem_execbuf should be long enough that the accuracy of
> gettime is insignificant; and this is a test not a benchmark! Remove the
> 1024 loop so that we check for timeout more frequently.
>
> Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
Reviewed-by: Mika Kuoppala <mika.kuoppala@linux.intel.com>
> ---
> tests/i915/gem_exec_create.c | 26 ++++++++++++--------------
> 1 file changed, 12 insertions(+), 14 deletions(-)
>
> diff --git a/tests/i915/gem_exec_create.c b/tests/i915/gem_exec_create.c
> index 102a161d5..e3ceb3f5c 100644
> --- a/tests/i915/gem_exec_create.c
> +++ b/tests/i915/gem_exec_create.c
> @@ -93,23 +93,21 @@ static void all(int fd, unsigned flags, int timeout, int ncpus)
> count = 0;
> clock_gettime(CLOCK_MONOTONIC, &start);
> do {
> - for (int loop = 0; loop < 1024; loop++) {
> - for (int n = 0; n < nengine; n++) {
> - obj.handle = gem_create(fd, 4096);
> - gem_write(fd, obj.handle, 0, &bbe, sizeof(bbe));
> - execbuf.flags &= ~ENGINE_FLAGS;
> - execbuf.flags |= engines[n];
> - gem_execbuf(fd, &execbuf);
> - if (flags & LEAK)
> - gem_madvise(fd, obj.handle, I915_MADV_DONTNEED);
> - else
> - gem_close(fd, obj.handle);
> - }
> + for (int n = 0; n < nengine; n++) {
> + obj.handle = gem_create(fd, 4096);
> + gem_write(fd, obj.handle, 0, &bbe, sizeof(bbe));
> + execbuf.flags &= ~ENGINE_FLAGS;
> + execbuf.flags |= engines[n];
> + gem_execbuf(fd, &execbuf);
> + if (flags & LEAK)
> + gem_madvise(fd, obj.handle, I915_MADV_DONTNEED);
> + else
> + gem_close(fd, obj.handle);
> }
> - count += nengine * 1024;
> + count += nengine;
> clock_gettime(CLOCK_MONOTONIC, &now);
> } while (elapsed(&start, &now) < timeout); /* Hang detection ~120s */
> - obj.handle = gem_create(fd, 4096);
> + obj.handle = gem_create(fd, 4096);
> gem_write(fd, obj.handle, 0, &bbe, sizeof(bbe));
> for (int n = 0; n < nengine; n++) {
> execbuf.flags &= ~ENGINE_FLAGS;
> --
> 2.25.1
>
> _______________________________________________
> Intel-gfx mailing list
> Intel-gfx@lists.freedesktop.org
> https://lists.freedesktop.org/mailman/listinfo/intel-gfx
_______________________________________________
igt-dev mailing list
igt-dev@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/igt-dev
next prev parent reply other threads:[~2020-03-03 14:34 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2020-03-03 14:18 [igt-dev] [PATCH i-g-t] i915/gem_exec_create: Trim loop counters Chris Wilson
2020-03-03 14:34 ` Mika Kuoppala [this message]
2020-03-03 15:43 ` [igt-dev] ✓ Fi.CI.BAT: success for " Patchwork
2020-03-04 3:39 ` [igt-dev] ✓ Fi.CI.IGT: " 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=87o8td5wym.fsf@gaia.fi.intel.com \
--to=mika.kuoppala@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