From: Ben Widawsky <ben@bwidawsk.net>
To: Chris Wilson <chris@chris-wilson.co.uk>,
Ben Widawsky <benjamin.widawsky@intel.com>,
Intel GFX <intel-gfx@lists.freedesktop.org>,
Mika Kuoppala <mika.kuoppala@linux.intel.com>
Subject: Re: [PATCH 5/5] drm/i915: Fix error capture on BYT/BDW
Date: Mon, 27 Jan 2014 12:31:08 -0800 [thread overview]
Message-ID: <20140127203108.GC5369@bwidawsk.net> (raw)
In-Reply-To: <20140127134522.GD2508@nuc-i3427.alporthouse.com>
On Mon, Jan 27, 2014 at 01:45:22PM +0000, Chris Wilson wrote:
> On Sun, Jan 26, 2014 at 01:47:29PM -0800, Ben Widawsky wrote:
> > On Sun, Jan 26, 2014 at 07:55:59PM +0000, Chris Wilson wrote:
> > > On Sun, Jan 26, 2014 at 11:05:40AM -0800, Ben Widawsky wrote:
> > > > On Sun, Jan 26, 2014 at 11:47:40AM +0000, Chris Wilson wrote:
> > > > > On Fri, Jan 24, 2014 at 06:17:45PM -0800, Ben Widawsky wrote:
> > > > > > The previous check during error capture of whether or not the current VM
> > > > > > should be scanned used, gen < 7. That was more or less trying to
> > > > > > determine if there was a full PPGTT. At the time, this was sort of what
> > > > > > I meant to do because I was more interested in working backwards from
> > > > > > hardware state. However, this is incorrect because it will not include
> > > > > > platforms that are greater than gen7, and not having PPGTT. Example
> > > > > > would be BYT which is gen7 but doesn't have PPGTT, BDW, or any platform
> > > > > > greater than gen7 with the PPGTT module parameter invoked.
> > > > > >
> > > > > > I am /assuming/ BYT was broken, I have not actually checked.
> > > > > >
> > > > > > While here, clean up the file a bit to avoid duplicate reads (now that
> > > > > > the PPGTT info is in the error state).
> > > > > >
> > > > > > I think Mika/Chris may have been looking at this too.
> > > > >
> > > > > Sure, we are looking (for identifying the guilty request/batch) by using
> > > > > the older, simpler mechanism of finding the first incomplete request. I
> > > > > think that search is now definite since we preallocate the request and no
> > > > > longer do request collascing if ENOMEM (i.e. there is a 1:1 relationship
> > > > > between seqno/batch/request).
> > > > >
> > > > > That should also apply here and be much simpler.
> > > >
> > > > How does that solve hangs which aren't caused by requests?
> > >
> > > Was that an intentional rhetorical question?
> > >
> > > The code you touch here only deals with requests - finding the current
> > > batchbuffer if any.
> > > -Chris
> > >
> >
> > It wasn't rhetorical. I temporarily ignored that all batches are tied to
> > a request.
> >
> > So what's the plan now? Just looking at the callers, we seem to have a
> > couple of callers that can't easily identify the bad request.
>
> I was thinking along the lines of:
>
> @@ -737,31 +709,16 @@ i915_error_first_batchbuffer(struct drm_i915_private *dev_priv,
> }
>
> seqno = ring->get_seqno(ring, false);
> - list_for_each_entry(vm, &dev_priv->vm_list, global_link) {
> - if (!is_active_vm(vm, ring))
> + list_for_each_entry(request, &ring->request_list, list) {
> + if (i915_seqno_passed(seqno, request->seqno))
> continue;
>
> - found_active = true;
> -
> - list_for_each_entry(vma, &vm->active_list, mm_list) {
> - obj = vma->obj;
> - if (obj->ring != ring)
> - continue;
> -
> - if (i915_seqno_passed(seqno, obj->last_read_seqno))
> - continue;
> -
> - if ((obj->base.read_domains & I915_GEM_DOMAIN_COMMAND) == 0)
> - continue;
> -
> - /* We need to copy these to an anonymous buffer as the simplest
> - * method to avoid being overwritten by userspace.
> - */
> - return i915_error_object_create(dev_priv, obj, vm);
> - }
> + /* We need to copy these to an anonymous buffer as the simplest
> + * method to avoid being overwritten by userspace.
> + */
> + return i915_error_object_create(dev_priv, request->batch_obj, request->ctx->vm);
> }
>
> - WARN_ON(!found_active);
>
The other issue is the existing method doesn't rely as much on proper
request handling, ie. this could be more resilient to driver bugs. I
kind of want to keep both...
--
Ben Widawsky, Intel Open Source Technology Center
next prev parent reply other threads:[~2014-01-27 20:31 UTC|newest]
Thread overview: 26+ messages / expand[flat|nested] mbox.gz Atom feed top
2014-01-25 2:17 [PATCH 1/5] drm/i915: Place the Global GTT VM first in the list of VM Ben Widawsky
2014-01-25 2:17 ` [PATCH 2/5] drm/i915: Print captured bo for all VM in error state Ben Widawsky
2014-01-25 2:17 ` [PATCH 3/5] drm/i915: Create a USES_PPGTT macro Ben Widawsky
2014-01-25 20:41 ` Daniel Vetter
2014-01-26 5:45 ` Ben Widawsky
2014-01-26 9:24 ` Daniel Vetter
2014-01-25 2:17 ` [PATCH 4/5] drm/i915: Capture PPGTT info on error capture Ben Widawsky
2014-01-26 11:42 ` Chris Wilson
2014-01-26 19:06 ` Ben Widawsky
2014-01-26 19:51 ` Chris Wilson
2014-01-25 2:17 ` [PATCH 5/5] drm/i915: Fix error capture on BYT/BDW Ben Widawsky
2014-01-26 11:47 ` Chris Wilson
2014-01-26 19:05 ` Ben Widawsky
2014-01-26 19:55 ` Chris Wilson
2014-01-26 21:47 ` Ben Widawsky
2014-01-27 13:45 ` Chris Wilson
2014-01-27 18:24 ` Ben Widawsky
2014-01-27 20:31 ` Ben Widawsky [this message]
2014-01-27 21:31 ` Chris Wilson
2014-01-27 21:54 ` Ben Widawsky
2014-01-25 8:32 ` [PATCH 1/5] drm/i915: Place the Global GTT VM first in the list of VM Kenneth Graunke
2014-01-25 20:48 ` Daniel Vetter
2014-01-25 21:31 ` Kenneth Graunke
2014-01-26 5:09 ` Ben Widawsky
2014-01-26 9:26 ` Daniel Vetter
2014-01-26 11:10 ` 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=20140127203108.GC5369@bwidawsk.net \
--to=ben@bwidawsk.net \
--cc=benjamin.widawsky@intel.com \
--cc=chris@chris-wilson.co.uk \
--cc=intel-gfx@lists.freedesktop.org \
--cc=mika.kuoppala@linux.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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox