[Intel-gfx] [PATCH] drm/i915: Skip execlists_dequeue() early if the list is empty

Chris Wilson chris at chris-wilson.co.uk
Fri Mar 17 10:34:54 UTC 2017


On Fri, Mar 17, 2017 at 10:30:10AM +0000, Tvrtko Ursulin wrote:
> 
> On 16/03/2017 14:53, Chris Wilson wrote:
> >Do an early read of the execlists' queue before we take the spinlock and
> >start checking. This is safe as the first writer to the execlists queue
> >will cause the tasklet to be run again after a memory barrier.
> 
> Which one is the memory barrier, tasklet_hi_schedule? Wouldn't we
> need an explicit one after setting engine->execlist_first in
> execlists_submit_request now?

Yes, the tasklet scheduling incurs a memory barrier, which we do after
setting execlist_first i.e. we know that after doing so there is always
at least one more invocation of the tasklet.
-Chris

-- 
Chris Wilson, Intel Open Source Technology Centre


More information about the Intel-gfx mailing list