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

Tvrtko Ursulin tvrtko.ursulin at linux.intel.com
Wed Oct 9 16:37:42 UTC 2019


On 09/10/2019 16:59, Chris Wilson wrote:
> 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.

I don't see it spinning, I see it unlinking the tasklet is trylock fails 
and going onto the next one. So even what I implied before seems wrong - 
it doesn't look like it would get re-run on next tasklet processing run. 
Where do you see the retry?

Regards,

Tvrtko




More information about the Intel-gfx mailing list