From: "Ville Syrjälä" <ville.syrjala@linux.intel.com>
To: Chris Wilson <chris@chris-wilson.co.uk>
Cc: intel-gfx@lists.freedesktop.org
Subject: Re: [PATCH igt] lib/gt: Insert an arbitration point in our hang batch
Date: Fri, 27 Oct 2017 16:24:16 +0300 [thread overview]
Message-ID: <20171027132416.GH10981@intel.com> (raw)
In-Reply-To: <150910915771.2864.6041400057434900082@mail.alporthouse.com>
On Fri, Oct 27, 2017 at 01:59:17PM +0100, Chris Wilson wrote:
> Quoting Ville Syrjälä (2017-10-27 13:54:49)
> > On Fri, Oct 27, 2017 at 01:45:35PM +0100, Chris Wilson wrote:
> > > A purely recursive batch has the downside that it is a severe drain on
> > > system resources (see commit f978cc027cd0 "lib/dummyload: Pad with a few
> > > nops so that we do not completely hog the system") which can result in
> > > the test being starved and failing to make reasonably progress. For more
> > > reliable resets, also include an arbitration point. This should lessen
> > > the efficacy of the hang...
> > >
> > > Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
> > > Cc: Ville Syrjälä <ville.syrjala@linux.intel.com>
> > > Cc: Mika Kuoppala <mika.kuoppala@linux.intel.com>
> > > ---
> > > lib/igt_gt.c | 10 +++++-----
> > > 1 file changed, 5 insertions(+), 5 deletions(-)
> > >
> > > diff --git a/lib/igt_gt.c b/lib/igt_gt.c
> > > index 89727d22..2aebad14 100644
> > > --- a/lib/igt_gt.c
> > > +++ b/lib/igt_gt.c
> > > @@ -313,12 +313,12 @@ igt_hang_t igt_hang_ctx(int fd,
> > > len = 2;
> > > if (intel_gen(intel_get_drm_devid(fd)) >= 8)
> > > len++;
> > > - b[0] = MI_BATCH_BUFFER_START | (len - 2);
> > > - b[len] = MI_BATCH_BUFFER_END;
> > > - b[len+1] = MI_NOOP;
> > > - gem_write(fd, exec.handle, 0, b, sizeof(b));
> > > + b[0] = 0x5 << 24; /* ARB_CHk */
> >
> > That seems to be gen4+ only. Also
> > "This instruction can be placed only in a ring buffer, never in a batch
> > buffer."
>
> Idea of since/until when? It's definitely listed for batches on gen8+.
If I'm reading things correctly then IVB+ can have it in an RCS batch.
But for the other engines it seems that the "ring only" restriction
still applies, until some *future* gen.
> The good news being an unrecognised MI cmd it is skipped. Better news if
> it causes a GPU hang ;)
Based on the description it could be that it just blindly jumps to UHPTR
and there wouldn't be any way to get back to the batch. Maybe. That's
assuming UHPTR would have the valid bit set in the first place. I guess
if UHPTR isn't valid then nothing should happend whether or not the
parser accepts the command.
I don't actually know how you would get back to the previous point on
the ring either after jumping to UHPTR from the ring. Is the previous
HEAD saved somewhere?
--
Ville Syrjälä
Intel OTC
_______________________________________________
Intel-gfx mailing list
Intel-gfx@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/intel-gfx
next prev parent reply other threads:[~2017-10-27 13:24 UTC|newest]
Thread overview: 7+ messages / expand[flat|nested] mbox.gz Atom feed top
2017-10-27 12:45 [PATCH igt] lib/gt: Insert an arbitration point in our hang batch Chris Wilson
2017-10-27 12:54 ` Ville Syrjälä
2017-10-27 12:59 ` Chris Wilson
2017-10-27 13:13 ` Chris Wilson
2017-10-27 13:24 ` Ville Syrjälä [this message]
2017-10-27 13:30 ` Chris Wilson
2017-10-27 13:21 ` ✗ Fi.CI.BAT: warning for " 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=20171027132416.GH10981@intel.com \
--to=ville.syrjala@linux.intel.com \
--cc=chris@chris-wilson.co.uk \
--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