Intel-GFX Archive on lore.kernel.org
 help / color / mirror / Atom feed
From: Daniel Vetter <daniel@ffwll.ch>
To: Chris Wilson <chris@chris-wilson.co.uk>,
	Tomas Elf <tomas.elf@intel.com>,
	Intel-GFX@Lists.FreeDesktop.Org
Subject: Re: [PATCH v2] drm/i915: Snapshot seqno of most recently submitted request.
Date: Thu, 9 Jul 2015 18:17:22 +0200	[thread overview]
Message-ID: <20150709161722.GI21858@phenom.ffwll.local> (raw)
In-Reply-To: <20150709150705.GX32370@nuc-i3427.alporthouse.com>

On Thu, Jul 09, 2015 at 04:07:05PM +0100, Chris Wilson wrote:
> On Thu, Jul 09, 2015 at 03:30:57PM +0100, Tomas Elf wrote:
> > The hang checker needs to inspect whether or not the ring request list is empty
> > as well as if the given engine has reached or passed the most recently
> > submitted request. The problem with this is that the hang checker cannot grab
> > the struct_mutex, which is required in order to safely inspect requests since
> > requests might be deallocated during inspection. In the past we've had kernel
> > panics due to this very unsynchronized access in the hang checker.
> > 
> > One solution to this problem is to not inspect the requests directly since
> > we're only interested in the seqno of the most recently submitted request - not
> > the request itself. Instead the seqno of the most recently submitted request is
> > stored separately, which the hang checker then inspects, circumventing the
> > issue of synchronization from the hang checker entirely.
> > 
> > v2 (Chris Wilson):
> > - Pass current engine seqno to ring_idle() from i915_hangcheck_elapsed() rather
> > than compute it over again.
> > - Remove extra whitespace.
> > 
> > Issue: VIZ-5998
> > Signed-off-by: Tomas Elf <tomas.elf@intel.com>
> 
> Yup, that is a nice simple fix by partially reverting the
> s/seqno/requests/ change (and improving upon it in the process).
> 
> We should mention
> 
> Fixes commit 44cdd6d219bc64f6810b8ed0023a4d4db9e0fe68
> Author: John Harrison <John.C.Harrison@Intel.com>
> Date:   Mon Nov 24 18:49:40 2014 +0000
> 
>     drm/i915: Convert 'ring_idle()' to use requests not seqnos
> 
> and
> Cc: stable@vger.kernel.org
> Reviewed-by: Chris Wilson <chris@chris-wilson.co.uk>

Added and applied to -fixes, thanks.
-Daniel
-- 
Daniel Vetter
Software Engineer, Intel Corporation
http://blog.ffwll.ch
_______________________________________________
Intel-gfx mailing list
Intel-gfx@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/intel-gfx

      reply	other threads:[~2015-07-09 16:14 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2015-07-09 14:30 [PATCH v2] drm/i915: Snapshot seqno of most recently submitted request Tomas Elf
2015-07-09 15:07 ` Chris Wilson
2015-07-09 16:17   ` Daniel Vetter [this message]

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=20150709161722.GI21858@phenom.ffwll.local \
    --to=daniel@ffwll.ch \
    --cc=Intel-GFX@Lists.FreeDesktop.Org \
    --cc=chris@chris-wilson.co.uk \
    --cc=tomas.elf@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