AMD-GFX Archive on lore.kernel.org
 help / color / mirror / Atom feed
From: Felix Kuehling <felix.kuehling@amd.com>
To: "Christian König" <ckoenig.leichtzumerken@gmail.com>,
	alex.sierra@amd.com, philip.yang@amd.com,
	amd-gfx@lists.freedesktop.org
Subject: Re: [PATCH] drm/amdgpu: partially revert "svm bo enable_signal call condition"
Date: Mon, 22 Nov 2021 11:52:55 -0500	[thread overview]
Message-ID: <27ca2dba-2ff5-9bd2-b513-95b54581b5ce@amd.com> (raw)
In-Reply-To: <20211122123926.385017-1-christian.koenig@amd.com>

Am 2021-11-22 um 7:39 a.m. schrieb Christian König:
> Partially revert commit 5f319c5c21b5909abb43d8aadc92a8aa549ee443.
>
> First of all this is illegal use of RCU to call dma_fence_enable_sw_signaling()
> since we don't hold a reference to the fence in question and can crash badly.
>
> Then the code doesn't seem to have the intended effect since only the
> exclusive fence is handled, but the KFD fences are always added as shared fence.
>
> Only keep the handling to throw away the content of SVM BOs.
>
> Signed-off-by: Christian König <christian.koenig@amd.com>

Reviewed-by: Felix Kuehling <Felix.Kuehling@amd.com>


> ---
>  drivers/gpu/drm/amd/amdgpu/amdgpu_ttm.c | 9 ---------
>  1 file changed, 9 deletions(-)
>
> diff --git a/drivers/gpu/drm/amd/amdgpu/amdgpu_ttm.c b/drivers/gpu/drm/amd/amdgpu/amdgpu_ttm.c
> index 30b7dde496fc..b9cd32d25bc0 100644
> --- a/drivers/gpu/drm/amd/amdgpu/amdgpu_ttm.c
> +++ b/drivers/gpu/drm/amd/amdgpu/amdgpu_ttm.c
> @@ -113,17 +113,8 @@ static void amdgpu_evict_flags(struct ttm_buffer_object *bo,
>  
>  	abo = ttm_to_amdgpu_bo(bo);
>  	if (abo->flags & AMDGPU_AMDKFD_CREATE_SVM_BO) {
> -		struct dma_fence *fence;
> -		struct dma_resv *resv = &bo->base._resv;
> -
> -		rcu_read_lock();
> -		fence = rcu_dereference(resv->fence_excl);
> -		if (fence && !fence->ops->signaled)
> -			dma_fence_enable_sw_signaling(fence);
> -
>  		placement->num_placement = 0;
>  		placement->num_busy_placement = 0;
> -		rcu_read_unlock();
>  		return;
>  	}
>  

      reply	other threads:[~2021-11-22 16:53 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-11-22 12:39 [PATCH] drm/amdgpu: partially revert "svm bo enable_signal call condition" Christian König
2021-11-22 16:52 ` Felix Kuehling [this message]

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=27ca2dba-2ff5-9bd2-b513-95b54581b5ce@amd.com \
    --to=felix.kuehling@amd.com \
    --cc=alex.sierra@amd.com \
    --cc=amd-gfx@lists.freedesktop.org \
    --cc=ckoenig.leichtzumerken@gmail.com \
    --cc=philip.yang@amd.com \
    /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