All of lore.kernel.org
 help / color / mirror / Atom feed
From: "Christian König" <ckoenig.leichtzumerken@gmail.com>
To: intel-gfx@lists.freedesktop.org, linaro-mm-sig@lists.linaro.org,
	dri-devel@lists.freedesktop.org, chris@chris-wilson.co.uk
Subject: [PATCH 5/8] dma-buf: further relax reservation_object_add_shared_fence
Date: Tue,  6 Aug 2019 17:01:31 +0200	[thread overview]
Message-ID: <20190806150134.104222-5-christian.koenig@amd.com> (raw)
In-Reply-To: <20190806150134.104222-1-christian.koenig@amd.com>

Other cores don't busy wait any more and we removed the last user of checking
the seqno for changes. Drop updating the number for shared fences altogether.

Signed-off-by: Christian König <christian.koenig@amd.com>
---
 drivers/dma-buf/reservation.c                    | 6 ------
 drivers/gpu/drm/amd/amdgpu/amdgpu_amdkfd_gpuvm.c | 7 +------
 2 files changed, 1 insertion(+), 12 deletions(-)

diff --git a/drivers/dma-buf/reservation.c b/drivers/dma-buf/reservation.c
index c0ba05936ab6..944d962ddddf 100644
--- a/drivers/dma-buf/reservation.c
+++ b/drivers/dma-buf/reservation.c
@@ -237,9 +237,6 @@ void reservation_object_add_shared_fence(struct reservation_object *obj,
 	fobj = reservation_object_get_list(obj);
 	count = fobj->shared_count;
 
-	preempt_disable();
-	write_seqcount_begin(&obj->seq);
-
 	for (i = 0; i < count; ++i) {
 
 		old = rcu_dereference_protected(fobj->shared[i],
@@ -257,9 +254,6 @@ void reservation_object_add_shared_fence(struct reservation_object *obj,
 	RCU_INIT_POINTER(fobj->shared[i], fence);
 	/* pointer update must be visible before we extend the shared_count */
 	smp_store_mb(fobj->shared_count, count);
-
-	write_seqcount_end(&obj->seq);
-	preempt_enable();
 	dma_fence_put(old);
 }
 EXPORT_SYMBOL(reservation_object_add_shared_fence);
diff --git a/drivers/gpu/drm/amd/amdgpu/amdgpu_amdkfd_gpuvm.c b/drivers/gpu/drm/amd/amdgpu/amdgpu_amdkfd_gpuvm.c
index fe062b76ec91..a4640ddc24d1 100644
--- a/drivers/gpu/drm/amd/amdgpu/amdgpu_amdkfd_gpuvm.c
+++ b/drivers/gpu/drm/amd/amdgpu/amdgpu_amdkfd_gpuvm.c
@@ -251,12 +251,7 @@ static int amdgpu_amdkfd_remove_eviction_fence(struct amdgpu_bo *bo,
 	new->shared_max = old->shared_max;
 	new->shared_count = k;
 
-	/* Install the new fence list, seqcount provides the barriers */
-	preempt_disable();
-	write_seqcount_begin(&resv->seq);
-	RCU_INIT_POINTER(resv->fence, new);
-	write_seqcount_end(&resv->seq);
-	preempt_enable();
+	rcu_assign_pointer(resv->fence, new);
 
 	/* Drop the references to the removed fences or move them to ef_list */
 	for (i = j, k = 0; i < old->shared_count; ++i) {
-- 
2.17.1

_______________________________________________
dri-devel mailing list
dri-devel@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/dri-devel

  parent reply	other threads:[~2019-08-06 15:01 UTC|newest]

Thread overview: 22+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2019-08-06 15:01 [PATCH 1/8] dma-buf: fix busy wait for new shared fences Christian König
2019-08-06 15:01 ` [PATCH 2/8] dma-buf: fix shared fence list handling in reservation_object_copy_fences Christian König
2019-08-06 19:06   ` Chris Wilson
2019-08-07 10:43     ` Christian König
2019-08-06 15:01 ` [PATCH 3/8] drm/i915: stop using seqcount for fenc pruning Christian König
2019-08-06 19:07   ` Chris Wilson
2019-08-06 15:01 ` [PATCH 4/8] drm/i915: use new reservation_object_fences helper Christian König
2019-08-06 19:09   ` Chris Wilson
2019-08-06 15:01 ` Christian König [this message]
2019-08-06 19:25   ` [PATCH 5/8] dma-buf: further relax reservation_object_add_shared_fence Chris Wilson
2019-08-06 15:01 ` [PATCH 6/8] dma-buf: simplify reservation_object_get_fences_rcu a bit Christian König
2019-08-06 19:11   ` Chris Wilson
2019-08-06 15:01 ` [PATCH 7/8] dma-buf: add reservation_object_fences helper Christian König
2019-08-06 19:24   ` Chris Wilson
2019-08-07  9:06     ` Christian König
2019-08-06 15:01 ` [PATCH 8/8] dma-buf: nuke reservation_object seq number Christian König
2019-08-06 19:57   ` Chris Wilson
2019-08-07 12:08     ` Christian König
2019-08-07 12:19       ` Chris Wilson
2019-08-07 13:05         ` Koenig, Christian
2019-08-06 18:57 ` [PATCH 1/8] dma-buf: fix busy wait for new shared fences Chris Wilson
2019-08-09 13:27 ` ✗ Fi.CI.BAT: failure for series starting with [1/8] " Patchwork

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=20190806150134.104222-5-christian.koenig@amd.com \
    --to=ckoenig.leichtzumerken@gmail.com \
    --cc=chris@chris-wilson.co.uk \
    --cc=dri-devel@lists.freedesktop.org \
    --cc=intel-gfx@lists.freedesktop.org \
    --cc=linaro-mm-sig@lists.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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.