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

Tvrtko Ursulin tvrtko.ursulin at linux.intel.com
Fri Mar 17 10:44:31 UTC 2017


On 17/03/2017 10:34, Chris Wilson wrote:
> 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.

Okay yes, test_and_set_bit in tasklet_schedule is a memory barrier.

See that Michal beat me to it, but anyway:

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

Regards,

Tvrtko



More information about the Intel-gfx mailing list