From: "Christian König" <ckoenig.leichtzumerken@gmail.com>
To: "Pan, Xinhui" <Xinhui.Pan@amd.com>,
"amd-gfx@lists.freedesktop.org" <amd-gfx@lists.freedesktop.org>
Cc: "Koenig, Christian" <Christian.Koenig@amd.com>,
"dri-devel@lists.freedesktop.org"
<dri-devel@lists.freedesktop.org>
Subject: Re: [PATCH] drm/amdgpu: flush the fence on the bo after we individualize
Date: Wed, 15 Jan 2020 14:19:18 +0100 [thread overview]
Message-ID: <3df4af2c-aced-bb33-a485-7eb8cb7adcb1@gmail.com> (raw)
In-Reply-To: <SN6PR12MB2800D9829487F03471B416C787370@SN6PR12MB2800.namprd12.prod.outlook.com>
Am 15.01.20 um 07:26 schrieb Pan, Xinhui:
> As we move the ttm_bo_individualize_resv() upwards, we need flush the
> copied fence too. Otherwise the driver keeps waiting for fence.
>
> run&Kill kfdtest, then perf top.
>
> 25.53% [ttm] [k] ttm_bo_delayed_delete
> 24.29% [kernel] [k] dma_resv_test_signaled_rcu
> 19.72% [kernel] [k] ww_mutex_lock
>
> Fix: 378e2d5b("drm/ttm: fix ttm_bo_cleanup_refs_or_queue once more")
> Signed-off-by: xinhui pan <xinhui.pan@amd.com>
That's indeed a rather nice idea. Reviewed-by: Christian König
<christian.koenig@amd.com>
I'm going to pick that up for inclusion in drm-misc-next. Please send
TTM patches also to the dri-devel mailing list in the future.
Christian.
> ---
> drivers/gpu/drm/ttm/ttm_bo.c | 4 +++-
> 1 file changed, 3 insertions(+), 1 deletion(-)
>
> diff --git a/drivers/gpu/drm/ttm/ttm_bo.c b/drivers/gpu/drm/ttm/ttm_bo.c
> index 8d91b0428af1..1494aebb8128 100644
> --- a/drivers/gpu/drm/ttm/ttm_bo.c
> +++ b/drivers/gpu/drm/ttm/ttm_bo.c
> @@ -499,8 +499,10 @@ static void ttm_bo_cleanup_refs_or_queue(struct ttm_buffer_object *bo)
>
> dma_resv_unlock(bo->base.resv);
> }
> - if (bo->base.resv != &bo->base._resv)
> + if (bo->base.resv != &bo->base._resv) {
> + ttm_bo_flush_all_fences(bo);
> dma_resv_unlock(&bo->base._resv);
> + }
>
> error:
> kref_get(&bo->list_kref);
_______________________________________________
dri-devel mailing list
dri-devel@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/dri-devel
parent reply other threads:[~2020-01-15 13:19 UTC|newest]
Thread overview: expand[flat|nested] mbox.gz Atom feed
[parent not found: <SN6PR12MB2800D9829487F03471B416C787370@SN6PR12MB2800.namprd12.prod.outlook.com>]
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=3df4af2c-aced-bb33-a485-7eb8cb7adcb1@gmail.com \
--to=ckoenig.leichtzumerken@gmail.com \
--cc=Christian.Koenig@amd.com \
--cc=Xinhui.Pan@amd.com \
--cc=amd-gfx@lists.freedesktop.org \
--cc=dri-devel@lists.freedesktop.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;
as well as URLs for NNTP newsgroup(s).