[Intel-gfx] [PATCH] drm/i915: Keep ring->active_list and ring->requests_list consistent

Daniel Vetter daniel at ffwll.ch
Mon Mar 23 01:43:25 PDT 2015


On Fri, Mar 20, 2015 at 03:36:11PM +0000, Chris Wilson wrote:
> On Fri, Mar 20, 2015 at 04:33:08PM +0100, Daniel Vetter wrote:
> > On Fri, Mar 20, 2015 at 03:04:39PM +0000, Chris Wilson wrote:
> > > The retire comes before the before the gpu_idle (we retire often as a
> > > part of busy, execbuffer, timers etc). The traces show exactly that.
> > 
> > Yeah, the sequence I see is:
> > 1. retire requests leaves active objects behind with all requests retired.
> > 2. evict_vim
> > |-> 2a. gpu_idle
> > |-> 2b. retire_requests
> > |-> 2c. WARN_ON(i915_gem_evict_vm);
> > 
> > I agree with you that before the call to evict_vm the lists are
> > inconsistent. What I don't understand how that inconsistency can get past
> > the 2a/2b double-punch.
> 
> 2a/2b are both no-ops in this scenario.

Lifted blindfolds, finally found the short-circuit

if (list_empty(&ring->request_list))
	return;

at the top of i915_gem_retire_requests_ring.

Reviewed-by: Daniel Vetter <daniel.vetter at ffwll.ch>

and for -fixes since the offending patch is in 4.0-rc1.
-Daniel
-- 
Daniel Vetter
Software Engineer, Intel Corporation
http://blog.ffwll.ch


More information about the Intel-gfx mailing list