From: Ben Widawsky Subject: Re: [PATCH 1/3] drm/i915: Rely on accurate request tracking for finding hung batches Date: Wed, 12 Feb 2014 11:02:34 -0800 Message-ID: <20140212190234.GB18418@bwidawsk.net> References: <1392042651-3278-1-git-send-email-mika.kuoppala@intel.com> <20140212015719.GD23746@bwidawsk.net> <20140212082558.GC28999@nuc-i3427.alporthouse.com> Mime-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Return-path: Received: from mail.bwidawsk.net (bwidawsk.net [166.78.191.112]) by gabe.freedesktop.org (Postfix) with ESMTP id 910DFFAD20 for ; Wed, 12 Feb 2014 11:02:41 -0800 (PST) Content-Disposition: inline In-Reply-To: <20140212082558.GC28999@nuc-i3427.alporthouse.com> List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: intel-gfx-bounces@lists.freedesktop.org Errors-To: intel-gfx-bounces@lists.freedesktop.org To: Chris Wilson , Mika Kuoppala , intel-gfx@lists.freedesktop.org, miku@iki.fi, Ben Widawsky List-Id: intel-gfx@lists.freedesktop.org On Wed, Feb 12, 2014 at 08:25:58AM +0000, Chris Wilson wrote: > On Tue, Feb 11, 2014 at 05:57:19PM -0800, Ben Widawsky wrote: > > On Mon, Feb 10, 2014 at 04:30:49PM +0200, Mika Kuoppala wrote: > > > -static struct drm_i915_gem_request * > > > -i915_gem_find_first_non_complete(struct intel_ring_buffer *ring) > > > +struct drm_i915_gem_request * > > > +i915_gem_find_active_request(struct intel_ring_buffer *ring) > > > { > > > struct drm_i915_gem_request *request; > > > - const u32 completed_seqno = ring->get_seqno(ring, false); > > > + u32 completed_seqno; > > > + > > > + if (WARN_ON(!ring->get_seqno)) > > > + return NULL; > > > > ring->get_seqno(ring, false) ? > > ? > > This was originally used in the error capture code to detect > uninitialised rings. We have a new flag for that now, don't we? Also, I don't think we can actually have an uninitialized ring at this point. > > > This looks like it's currently wrong below as well. > > ? > > > I still would have preferred to keep both methods for a while until we > > felt really comfortable with this... the commit message's statement that > > getting bad error state is inevitably a good thing is total bunk, I > > think. > > I strongly disagree. One of the critical factors you first scan for when > reading error states is whether it is self-consistent. If the error > state is inconsistent, we also know that some of our critical > infrastructure is wrong - which we can't know if the error capture code > was different. And in the cases where the error state is inconsistent, > the scanning method would also be snafu (because ACTHD is no longer > within the expected bounds). > -Chris > The ACTHD case is one of the reasons I can't argue for keeping the old method. (Though I think capturing all buffers with COMMAND domain gets you to the same end). Since you read way more error states than I, I'm happy to favor your opinion. As I said [but you cut] I am just a chicken. You already got my r-b, stop arguing. > -- > Chris Wilson, Intel Open Source Technology Centre -- Ben Widawsky, Intel Open Source Technology Center