[Intel-gfx] [PATCH] drm/i915/execlists: Remove incorrect BUG_ON for schedule-out

Tvrtko Ursulin tvrtko.ursulin at linux.intel.com
Mon Sep 9 10:23:56 UTC 2019


On 07/09/2019 11:50, Chris Wilson wrote:
> As we may unwind incomplete requests (for preemption) prior to
> processing the CSB and the schedule-out events, we may update rq->engine
> (resetting it to point back to the parent virtual engine) prior to
> calling execlists_schedule_out(), invalidating the assertion that the
> request still points to the inflight engine. (The likelihood of this is
> increased if the CSB interrupt processing is pushed to the ksoftirqd for
> being too slow and direct submission overtakes it.)
> 
> Reported-by: Vinay Belgaumkar <vinay.belgaumkar at intel.com>
> Fixes: df403069029d ("drm/i915/execlists: Lift process_csb() out of the irq-off spinlock")
> Signed-off-by: Chris Wilson <chris at chris-wilson.co.uk>
> Cc: Mika Kuoppala <mika.kuoppala at linux.intel.com>
> Cc: Tvrtko Ursulin <tvrtko.ursulin at intel.com>
> Cc: Vinay Belgaumkar <vinay.belgaumkar at intel.com>
> ---
>   drivers/gpu/drm/i915/gt/intel_lrc.c | 1 -
>   1 file changed, 1 deletion(-)
> 
> diff --git a/drivers/gpu/drm/i915/gt/intel_lrc.c b/drivers/gpu/drm/i915/gt/intel_lrc.c
> index 3aad35b570d4..16f226349525 100644
> --- a/drivers/gpu/drm/i915/gt/intel_lrc.c
> +++ b/drivers/gpu/drm/i915/gt/intel_lrc.c
> @@ -631,7 +631,6 @@ execlists_schedule_out(struct i915_request *rq)
>   	struct intel_engine_cs *cur, *old;
>   
>   	trace_i915_request_out(rq);
> -	GEM_BUG_ON(intel_context_inflight(ce) != rq->engine);
>   
>   	old = READ_ONCE(ce->inflight);
>   	do
> 

So unwind from direct submission resets rq->engine and races with 
process_csb from the tasklet which notices request has actually 
completed? Seems to hold true in code.

Reviewed-by: Tvrtko Ursulin <tvrtko.ursulin at intel.com>

Regards,

Tvrtko


More information about the Intel-gfx mailing list