From: Mika Kuoppala <mika.kuoppala@linux.intel.com>
To: Chris Wilson <chris@chris-wilson.co.uk>, intel-gfx@lists.freedesktop.org
Cc: Tomi Sarvela <tomi.p.sarvela@intel.com>,
Daniel Vetter <daniel.vetter@intel.com>
Subject: Re: [PATCH igt] lib/dummyload: Pad with a few nops so that we do not completely hog the system
Date: Wed, 16 Aug 2017 17:45:54 +0300 [thread overview]
Message-ID: <87ziazr2ot.fsf@gaia.fi.intel.com> (raw)
In-Reply-To: <20170816133915.29342-1-chris@chris-wilson.co.uk>
Chris Wilson <chris@chris-wilson.co.uk> writes:
> Part of the attraction of using a recursive batch is that it is
> hard on the system (executing the "function" call is apparently
> quite expensive). However, the GPU may hog the entire system for
> a few minutes, preventing even NMI. Quite why this is so is unclear,
> but presumably it relates to the PM_INTRMSK workaround on gen6/gen7.
> If we give the system a break by having the GPU execute a few nops
> between function calls, that appears enough to keep SNB out of
> trouble.
>
Can we trip into the same pit with igt_hang? It has tight
recurse. Adding few noops makes the hangcheck sampler
to hit more sparsely and slow the verdict of hang.
But we can then improve the heuristics ;)
-Mika
> Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
> Cc: Tomi Sarvela <tomi.p.sarvela@intel.com>
> Cc: Daniel Vetter <daniel.vetter@intel.com>
> ---
> lib/igt_dummyload.c | 18 ++++++++++++++++--
> 1 file changed, 16 insertions(+), 2 deletions(-)
>
> diff --git a/lib/igt_dummyload.c b/lib/igt_dummyload.c
> index 00c6a030..c6e57cff 100644
> --- a/lib/igt_dummyload.c
> +++ b/lib/igt_dummyload.c
> @@ -103,7 +103,7 @@ static void emit_recursive_batch(igt_spin_t *spin,
> /* dummy write to dependency */
> obj[SCRATCH].handle = dep;
> fill_reloc(&relocs[obj[BATCH].relocation_count++],
> - dep, 256,
> + dep, 1020,
> I915_GEM_DOMAIN_RENDER,
> I915_GEM_DOMAIN_RENDER);
> execbuf.buffer_count++;
> @@ -112,9 +112,23 @@ static void emit_recursive_batch(igt_spin_t *spin,
> spin->batch = batch;
> spin->handle = obj[BATCH].handle;
>
> + /* Pad with a few nops so that we do not completely hog the system.
> + *
> + * Part of the attraction of using a recursive batch is that it is
> + * hard on the system (executing the "function" call is apparently
> + * quite expensive). However, the GPU may hog the entire system for
> + * a few minutes, preventing even NMI. Quite why this is so is unclear,
> + * but presumably it relates to the PM_INTRMSK workaround on gen6/gen7.
> + * If we give the system a break by having the GPU execute a few nops
> + * between function calls, that appears enough to keep SNB out of
> + * trouble. See https://
> + */
> + batch += 1000;
> +
> /* recurse */
> fill_reloc(&relocs[obj[BATCH].relocation_count],
> - obj[BATCH].handle, 1, I915_GEM_DOMAIN_COMMAND, 0);
> + obj[BATCH].handle, (batch - spin->batch) + 1,
> + I915_GEM_DOMAIN_COMMAND, 0);
> if (gen >= 8) {
> *batch++ = MI_BATCH_BUFFER_START | 1 << 8 | 1;
> *batch++ = 0;
> --
> 2.14.1
>
> _______________________________________________
> Intel-gfx mailing list
> Intel-gfx@lists.freedesktop.org
> https://lists.freedesktop.org/mailman/listinfo/intel-gfx
_______________________________________________
Intel-gfx mailing list
Intel-gfx@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/intel-gfx
next prev parent reply other threads:[~2017-08-16 14:47 UTC|newest]
Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top
2017-08-16 13:39 [PATCH igt] lib/dummyload: Pad with a few nops so that we do not completely hog the system Chris Wilson
2017-08-16 14:01 ` ✓ Fi.CI.BAT: success for " Patchwork
2017-08-16 14:08 ` [PATCH igt] " Jani Nikula
2017-08-16 14:10 ` Chris Wilson
2017-08-16 14:45 ` Mika Kuoppala [this message]
2017-08-16 15:12 ` Chris Wilson
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=87ziazr2ot.fsf@gaia.fi.intel.com \
--to=mika.kuoppala@linux.intel.com \
--cc=chris@chris-wilson.co.uk \
--cc=daniel.vetter@intel.com \
--cc=intel-gfx@lists.freedesktop.org \
--cc=tomi.p.sarvela@intel.com \
/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.