[PATCH 1/8] dma-buf: fix busy wait for new shared fences

Chris Wilson chris at chris-wilson.co.uk
Tue Aug 6 18:57:31 UTC 2019


Quoting Christian König (2019-08-06 16:01:27)
> When reservation_object_add_shared_fence is replacing an old fence with a new
> one we should not drop the old one before the new one is in place.
> 
> Otherwise other cores can busy wait for the new one to appear.

I see. The reader will see a refcount==0 fence and restart, whereas by
dropping the ref later, that reader has a better chance of getting to
the end before noticing the change.

> Signed-off-by: Christian König <christian.koenig at amd.com>
Reviewed-by: Chris Wilson <chris at chris-wilson.co.uk>
-Chris


More information about the dri-devel mailing list