[Intel-gfx] [PATCH] drm/i915/gt: Prevent queuing retire workers on the virtual engine

Chris Wilson chris at chris-wilson.co.uk
Thu Feb 6 15:29:23 UTC 2020


Quoting Chris Wilson (2020-02-06 15:23:25)
> Virtual engines are fleeting. They carry a reference count and may be freed
> when their last request is retired. This makes them unsuitable for the
> task of housing engine->retire.work so assert that it is not used.
> 
> Tvrtko tracked down an instance where we did indeed violate this rule.
> In virtal_submit_request, we flush a completed request directly with
> __i915_request_submit and this causes us to queue that request on the
> veng's breadcrumb list and signal it. Leading us down a path where we
> should not attach the retire.
> 
> Reported-by: Tvrtko Ursulin <tvrtko.ursulin at intel.com>
> Fixes: dc93c9b69315 ("drm/i915/gt: Schedule request retirement when signaler idles")
> Signed-off-by: Chris Wilson <chris at chris-wilson.co.uk>
> Cc: Tvrtko Ursulin <tvrtko.ursulin at intel.com>

Alternatively we could fixup the rq->engine before
__i915_request_submit. That would stop the spread of
intel_virtual_engine_get_sibling().

This is likely to be the cleaner fix, so I think I would prefer this and
then remove the get_sibling().
-Chris


More information about the Intel-gfx mailing list