From: Chris Wilson Subject: Re: [PATCH 04/13] drm/i915: track ring progression using seqnos Date: Tue, 26 Feb 2013 15:31:51 +0000 Message-ID: <20130226153151.GA780@cantiga.alporthouse.com> References: <1361876716-8625-1-git-send-email-mika.kuoppala@intel.com> <1361876716-8625-5-git-send-email-mika.kuoppala@intel.com> <20130226141229.GA32307@cantiga.alporthouse.com> <878v6bm7sg.fsf@gaia.fi.intel.com> Mime-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Return-path: Received: from mga01.intel.com (mga01.intel.com [192.55.52.88]) by gabe.freedesktop.org (Postfix) with ESMTP id 52BA9E5C57 for ; Tue, 26 Feb 2013 07:32:02 -0800 (PST) Content-Disposition: inline In-Reply-To: <878v6bm7sg.fsf@gaia.fi.intel.com> List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: intel-gfx-bounces+gcfxdi-intel-gfx=m.gmane.org@lists.freedesktop.org Errors-To: intel-gfx-bounces+gcfxdi-intel-gfx=m.gmane.org@lists.freedesktop.org To: Mika Kuoppala Cc: intel-gfx@lists.freedesktop.org List-Id: intel-gfx@lists.freedesktop.org On Tue, Feb 26, 2013 at 05:09:03PM +0200, Mika Kuoppala wrote: > Chris Wilson writes: > > > On Tue, Feb 26, 2013 at 01:05:07PM +0200, Mika Kuoppala wrote: > >> Instead of relying in acthd, track ring seqno progression > >> to detect if ring has hung. > > > > This needs a comment that it has a user visible side-effect of limiting > > batches to a maximum of 1.5s runtime. Before, that limit was softer in > > that we had a chance to spot that the GPU was busy - even if we could be > > fooled by an infinite loop. > > As the current code has: > > > if (dev_priv->gpu_error.hangcheck_count++ > 1) > > to trigger the hang, so it will trigger at 3rd timer call (4.5seconds) > > With my patch it will be 4.5 seconds if rings are waiting > and 3 seconds if there is non waiting ring involved. > > As i can't explain what is the added benefit to declare hang earlier > if there is a non waiting ring, do you want me to simplify this > to just declare hang if there is no progress in 4.5 seconds in both cases? > To match the old trigger timing. Yes, that would be good if you can simplify the logic so that it does not react differently for no apparent reason. I would prefer the 3s timeout. > > Did you write an i-g-t for detecting a ring of chained batchbuffers? > > -Chris > > Yes, you can find it in here: > > https://github.com/mkuoppal/intel-gpu-tools/commit/1df7d49ff9ecedf9c55933a9e36b1eb41f07abc6 I definitely add an exercise for an infinite loop that was not caught by the current hangcheck, and add a fixes: note to this changelog. (Couldn't spot that explicit case in the reset-status test, and it can be added independently of this series as an demonstration of a known breakage.) -Chris -- Chris Wilson, Intel Open Source Technology Centre