[Intel-gfx] [PATCH v2] drm/i915/gt: execlists->active is serialised by the tasklet

Chris Wilson chris at chris-wilson.co.uk
Wed Oct 9 16:32:32 UTC 2019


Quoting Chris Wilson (2019-10-09 17:09:06)
> The active/pending execlists is no longer protected by the
> engine->active.lock, but is serialised by the tasklet instead. Update
> the locking around the debug and stats to follow suit.
> 
> v2: local_bh_disable() to prevent recursing into the tasklet in case we
> trigger a softirq (Tvrtko)
> 
> 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>
> ---
>  drivers/gpu/drm/i915/gt/intel_engine.h    | 14 ++++++++++++++
>  drivers/gpu/drm/i915/gt/intel_engine_cs.c | 16 +++++++---------
>  drivers/gpu/drm/i915/i915_gem.h           |  6 ++++++
>  3 files changed, 27 insertions(+), 9 deletions(-)
> 
> diff --git a/drivers/gpu/drm/i915/gt/intel_engine.h b/drivers/gpu/drm/i915/gt/intel_engine.h
> index d624752f2a92..fa770d3ca208 100644
> --- a/drivers/gpu/drm/i915/gt/intel_engine.h
> +++ b/drivers/gpu/drm/i915/gt/intel_engine.h
> @@ -136,6 +136,20 @@ execlists_active(const struct intel_engine_execlists *execlists)
>         return READ_ONCE(*execlists->active);
>  }
>  
> +static inline void
> +execlists_active_lock(struct intel_engine_execlists *execlists)

execlists_active_bh_lock() to include the clue about bh_disable?

> +{
> +       local_bh_disable(); /* prevent local softirq and lock recursion */
> +       tasklet_lock(&execlists->tasklet);
> +}


More information about the Intel-gfx mailing list