public inbox for intel-gfx@lists.freedesktop.org
 help / color / mirror / Atom feed
From: Daniel Vetter <daniel@ffwll.ch>
To: Chris Wilson <chris@chris-wilson.co.uk>,
	Daniel Vetter <daniel@ffwll.ch>,
	intel-gfx@lists.freedesktop.org,
	John Harrison <John.C.Harrison@Intel.com>,
	Daniel Vetter <daniel.vetter@ffwll.ch>
Subject: Re: [PATCH] drm/i915: Keep ring->active_list and ring->requests_list consistent
Date: Fri, 20 Mar 2015 11:06:57 +0100	[thread overview]
Message-ID: <20150320100656.GG1349@phenom.ffwll.local> (raw)
In-Reply-To: <20150319221742.GA15445@nuc-i3427.alporthouse.com>

On Thu, Mar 19, 2015 at 10:17:42PM +0000, Chris Wilson wrote:
> On Thu, Mar 19, 2015 at 06:37:28PM +0100, Daniel Vetter wrote:
> > On Wed, Mar 18, 2015 at 06:19:22PM +0000, Chris Wilson wrote:
> > > 	WARNING: CPU: 0 PID: 1383 at drivers/gpu/drm/i915/i915_gem_evict.c:279 i915_gem_evict_vm+0x10c/0x140()
> > > 	WARN_ON(!list_empty(&vm->active_list))
> > 
> > How does this come about - we call gpu_idle before this seems to blow up,
> > so all requests should be completed?
> 
> Honestly, I couldn't figure it out either. I had an epiphany when I saw
> that we could now have an empty request list but non-empty active list
> added a test to detect when that happens and shouted eureka when the
> WARN fired. I could trigger the WARN in evict_vm pretty reliably, but
> not since this patch. It could just be masking another bug.

Can you perhaps double-check the theory by putting a
WARN_ON(list_empty(active_list) != list_empyt(request_list)) into
gpu_idle? Ofc with this patch reverted so that the bug surfaces again.


Really strange indeed.

> > And I don't think we can blame this
> > on racy seqno signalling, since gpu_idle does all the waiting already ...
> > 
> > > Identified by updating WATCH_LISTS:
> > > 
> > > 	[drm:i915_verify_lists] *ERROR* blitter ring: active list not empty, but no requests
> > > 	WARNING: CPU: 0 PID: 681 at drivers/gpu/drm/i915/i915_gem.c:2751 i915_gem_retire_requests_ring+0x149/0x230()
> > > 	WARN_ON(i915_verify_lists(ring->dev))
> > > 
> > > Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
> > > Cc: John Harrison <John.C.Harrison@Intel.com>
> > > Cc: Daniel Vetter <daniel.vetter@ffwll.ch>
> > 
> > Since we've just discussed this on irc: Doesn't this now enshrine that
> > every bo needs to hold a full request?
> 
> I'm not following. The bo hold a reference to requests, so we know we
> can iterate the ring->request_list and the ring->active_list
> independently. There is a challenge in doing the execbuf with as few
> kref as possible, but there is also the question of whether this
> particular function should go back to the previous behaviour of batching
> the completion evaluation for all requests such that they are evaluated
> consistently. One way without killing the abstraction entirely would be
> to evaluate the i915_request_complete() only for the request_list and
> then use the cached completion value for the active_list.

Yeah I meant the kref batching the old scheme would have allowed. I guess
better to figure this one out first completely before we dig into
micro-optimizations again.
-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-03-20 10:05 UTC|newest]

Thread overview: 19+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2015-03-18 18:19 [PATCH] drm/i915: Keep ring->active_list and ring->requests_list consistent Chris Wilson
2015-03-19 11:18 ` shuang.he
2015-03-19 17:37 ` Daniel Vetter
2015-03-19 22:17   ` Chris Wilson
2015-03-20 10:06     ` Daniel Vetter [this message]
2015-03-20 13:02       ` Chris Wilson
2015-03-20 13:39         ` Chris Wilson
2015-03-20 14:32           ` Daniel Vetter
2015-03-20 14:45             ` Chris Wilson
2015-03-20 15:00               ` Daniel Vetter
2015-03-20 15:04                 ` Chris Wilson
2015-03-20 15:33                   ` Daniel Vetter
2015-03-20 15:36                     ` Chris Wilson
2015-03-23  8:43                       ` Daniel Vetter
2015-03-23  8:49 ` Daniel Vetter
2015-03-23  9:13   ` Chris Wilson
2015-03-23  9:15     ` Chris Wilson
2015-03-23  9:40       ` Daniel Vetter
2015-03-25 11:43   ` Jani Nikula

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=20150320100656.GG1349@phenom.ffwll.local \
    --to=daniel@ffwll.ch \
    --cc=John.C.Harrison@Intel.com \
    --cc=chris@chris-wilson.co.uk \
    --cc=daniel.vetter@ffwll.ch \
    --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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox