All of lore.kernel.org
 help / color / mirror / Atom feed
From: Daniel Vetter <daniel@ffwll.ch>
To: Eric Anholt <eric@anholt.net>
Cc: Daniel Vetter <daniel.vetter@ffwll.ch>,
	Intel Graphics Development <intel-gfx@lists.freedesktop.org>
Subject: Re: [PATCH 2/2] drm/i915: drop the guard page at the end of the gtt
Date: Mon, 30 Jan 2012 20:14:21 +0100	[thread overview]
Message-ID: <20120130191421.GC4360@phenom.ffwll.local> (raw)
In-Reply-To: <87liopxb1u.fsf@eliezer.anholt.net>

On Mon, Jan 30, 2012 at 11:09:01AM -0800, Eric Anholt wrote:
> On Mon, 30 Jan 2012 16:55:49 +0100, Daniel Vetter <daniel.vetter@ffwll.ch> wrote:
> > Chris Wilson reported that with a bunch of patches to no longer force
> > batchbuffer (in most cases at least) into the mappable part of gtt
> > that his Pineview died while prefetching the last page of the gtt.
> > 
> > Turns out that since my intel-gtt rewrite we don't actually put a
> > dummy pte in that last page anymore. Which left me rather puzzled
> > because Chris' error_state was the first ever since that rewrite that
> > indicated a dead gpu due to prefetch.
> > 
> > So I've gone ahead and created the gem_cs_prefetch testcase which
> > reliably manages to execute a batch on the last page. Of all the
> > machines Chris and I have tried this on only his Pineview fell over,
> > all the others handled the invalid pte right after the end of the
> > batch correctly.
> > 
> > The other thing is that due to my intel-gtt we've also started to use
> > the non-mappable part of the gtt. So my theory is that this guard page
> > was only necessary when we didn't use and hence also didn't set up any
> > dummy ptes to the scratch page in that area. In that case the cs would
> > prefetch into the unmappable gtt area and fail over on the invalid
> > pte.
> > 
> > So given that this guard page smells like it just duct-taped over an
> > issue in our code I've simply removed it. And this seems to work!
> > 
> > Now we always run the risk that an odd machine we don't have in our
> > test labs needs this, but
> > - we now have an excellent testcase to diagnose any such issues
> > - and the patch is easy to revert.
> > Hence I prefer if we try to get rid of this.
> 
> I like the theory about invalid ptes -- makes sense to me.  I'm still a
> little confused: Does the pineview still fail after this patch, and
> would just making the hunk do what it meant to again fix it?

The pineview happily works when we use the entire gtt and doesn't fall
over when executing a batch in the very last page (as opposed to a batch
in the 2nd last page with the last one having an invalid pte). Just making
the code do again what it claims to do would do the trick, too.

But I'd like to get rid of the scratch ptes long-term so that we can make
good use of the resulting pagefaults for debugging stray writes (at least
on newer generations). This here is one step - but the big part isn't
really the patch but creating a test-case for the cs prefetcher so that we
can actually check things in a reliable, reproducible and quick way.

I'll clarify the commit msg to say more explicitly that pnv works with
this.
-Daniel

-- 
Daniel Vetter
Mail: daniel@ffwll.ch
Mobile: +41 (0)79 365 57 48

  reply	other threads:[~2012-01-30 19:14 UTC|newest]

Thread overview: 8+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2012-01-30 15:55 [PATCH 1/2] drm/i915: fix up locking inconsistency around gem_do_init Daniel Vetter
2012-01-30 15:55 ` [PATCH 2/2] drm/i915: drop the guard page at the end of the gtt Daniel Vetter
2012-01-30 19:09   ` Eric Anholt
2012-01-30 19:14     ` Daniel Vetter [this message]
2012-01-30 19:22       ` Daniel Vetter
2012-01-31 13:24         ` Daniel Vetter
2012-01-31 13:27           ` Daniel Vetter
2012-01-31 19:08   ` Daniel Vetter

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=20120130191421.GC4360@phenom.ffwll.local \
    --to=daniel@ffwll.ch \
    --cc=daniel.vetter@ffwll.ch \
    --cc=eric@anholt.net \
    --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 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.