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

Chris Wilson chris at chris-wilson.co.uk
Wed Oct 9 15:59:30 UTC 2019


Quoting Tvrtko Ursulin (2019-10-09 16:53:53)
> 
> On 09/10/2019 11:26, Chris Wilson wrote:
> > +static inline void
> > +execlists_active_lock(struct intel_engine_execlists *execlists)
> > +{
> > +     tasklet_lock(&execlists->tasklet);
> > +}
> > +
> > +static inline void
> > +execlists_active_unlock(struct intel_engine_execlists *execlists)
> > +{
> > +     tasklet_unlock(&execlists->tasklet);
> > +}
> 
> After we stop preventing the tasklet from running should we maybe kick 
> ksoftirqd? I am thinking if a tasklet gets scheduled and ran during us 
> holding the lock here, it won't lose the "scheduled" status, but not 
> sure at what next opportunity it would get re-run.

If we call tasklet_schedule() while we hold tasklet_lock, ksoftirqd (on
another thread, hmm, we need local_bh_disable() to stop ourselves
entering the softirq processing), then that tasklet_action will spin on
tasklet_trylock.
-Chris


More information about the Intel-gfx mailing list