From: "Koenig, Christian" <Christian.Koenig@amd.com>
To: Daniel Vetter <daniel@ffwll.ch>
Cc: "dri-devel@lists.freedesktop.org"
<dri-devel@lists.freedesktop.org>,
"chris@chris-wilson.co.uk" <chris@chris-wilson.co.uk>,
"daniel.vetter@ffwll.ch" <daniel.vetter@ffwll.ch>,
"sumit.semwal@linaro.org" <sumit.semwal@linaro.org>,
"linux-media@vger.kernel.org" <linux-media@vger.kernel.org>,
"linaro-mm-sig@lists.linaro.org" <linaro-mm-sig@lists.linaro.org>
Subject: Re: [PATCH 07/10] dma-buf/resv: add new fences container implementation
Date: Thu, 22 Aug 2019 13:53:56 +0000 [thread overview]
Message-ID: <63a0f99f-f90c-4697-dc7f-be7d596b73e7@amd.com> (raw)
In-Reply-To: <20190822130251.GT11147@phenom.ffwll.local>
Am 22.08.19 um 15:02 schrieb Daniel Vetter:
> On Thu, Aug 22, 2019 at 10:23:29AM +0200, Christian König wrote:
>> 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.
> Hm yeah ... I think there's still some users left that have an open-coded
> rcu section though. But yeah if you can concince Chris that this is ok I
> think it makes sense as an overall cleanup of the hand-rolled fences array
> we have for shared fences. But I'd really like to untangle it from the
> entire semantics discussion, since that seems entirely unrelated.
Yeah, agree. To untangle that is a really good idea.
Going to send out the dma_fence_array as a replacement for shared fences
separately first.
Christian.
> -Daniel
next prev parent reply other threads:[~2019-08-22 13:54 UTC|newest]
Thread overview: 33+ messages / expand[flat|nested] mbox.gz Atom feed top
2019-08-21 12:31 [RFC] replacing dma_resv API Christian König
2019-08-21 12:31 ` [PATCH 01/10] dma-buf: make to_dma_fence_array NULL safe Christian König
2019-08-21 12:31 ` [PATCH 02/10] dma-buf: add dma_fence_array_alloc/free Christian König
2019-08-21 12:31 ` [PATCH 03/10] dma-buf: add dma_fence_array_recycle Christian König
2019-08-21 16:24 ` Chris Wilson
2019-08-22 8:38 ` Christian König
2019-08-21 12:31 ` [PATCH 04/10] dma-buf: add dma_fence_array_for_each Christian König
2019-08-21 12:31 ` [PATCH 05/10] dma-buf/resv: add dma_resv_prune_fences Christian König
2019-08-21 14:55 ` Chris Wilson
2019-08-21 14:56 ` Chris Wilson
2019-08-21 12:31 ` [PATCH 06/10] dma-buf/resv: stop pruning shared fences when exclusive is added Christian König
2019-08-21 12:31 ` [PATCH 07/10] dma-buf/resv: add new fences container implementation Christian König
2019-08-21 16:04 ` Daniel Vetter
2019-08-22 8:23 ` Christian König
2019-08-22 13:02 ` Daniel Vetter
2019-08-22 13:53 ` Koenig, Christian [this message]
2019-08-21 12:31 ` [PATCH 08/10] dma-buf/resv: replace shared fence with new fences container Christian König
2019-08-21 15:24 ` Chris Wilson
2019-08-21 17:35 ` Chris Wilson
2019-08-22 8:37 ` Christian König
2019-08-22 9:16 ` Christian König
2019-08-21 16:21 ` Chris Wilson
2019-08-24 13:22 ` Chris Wilson
2019-08-21 12:31 ` [PATCH 09/10] dma-buf/resv: replace exclusive " Christian König
2019-08-21 12:31 ` [PATCH 10/10] dma-buf/resv: add other operations Christian König
2019-08-22 12:28 ` Ville Syrjälä
2019-08-21 16:13 ` [RFC] replacing dma_resv API Daniel Vetter
2019-08-21 20:05 ` Daniel Vetter
2019-08-22 9:27 ` Christian König
2019-08-21 20:11 ` Chris Wilson
2019-08-21 20:22 ` Daniel Vetter
2019-08-22 9:14 ` Christian König
2019-08-22 10:00 ` Daniel Vetter
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=63a0f99f-f90c-4697-dc7f-be7d596b73e7@amd.com \
--to=christian.koenig@amd.com \
--cc=chris@chris-wilson.co.uk \
--cc=daniel.vetter@ffwll.ch \
--cc=daniel@ffwll.ch \
--cc=dri-devel@lists.freedesktop.org \
--cc=linaro-mm-sig@lists.linaro.org \
--cc=linux-media@vger.kernel.org \
--cc=sumit.semwal@linaro.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox