Re: [PATCH 07/10] dma-buf/resv: add new fences container implementation

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Am 21.08.19 um 18:04 schrieb Daniel Vetter:
On Wed, Aug 21, 2019 at 02:31:44PM +0200, Christian König wrote:
[SNIP]
+	/* Try to drop the last reference */
+	if (!dma_fence_array_recycle(staged))
Without an rcu barrier here you're not syncing to new clients at all.
I don't think this works, and I expect that once you've readded all the
barriers and retry loops we're back to seqlocks.

The key difference is that RCU users now use dma_fence_get_rcu_safe() to grab a reference to the current set of fences.

In other words the whole array is reference counted and RCU protected instead of each individual entry in the array.

This way you don't need the sequence count any more because you grab a reference to all of them at once and then can be sure that they don't change.

Regards,
Christian.

-Daniel




[Index of Archives]     [Linux Input]     [Video for Linux]     [Gstreamer Embedded]     [Mplayer Users]     [Linux USB Devel]     [Linux Audio Users]     [Linux Kernel]     [Linux SCSI]     [Yosemite Backpacking]

  Powered by Linux