From: Felix Kuehling <felix.kuehling@amd.com>
To: "Christian König" <christian.koenig@amd.com>,
"James Zhu" <James.Zhu@amd.com>,
amd-gfx@lists.freedesktop.org, philip.yang@amd.com
Cc: jamesz@amd.com
Subject: Re: [PATCH] drm/amdkfd: remove unnecessary cpu domain validation
Date: Mon, 3 Mar 2025 16:01:49 -0500 [thread overview]
Message-ID: <f487c2da-fa5f-4186-a556-005617d603b5@amd.com> (raw)
In-Reply-To: <71929ed1-6c22-47dc-9f9a-a4bc15b21629@amd.com>
On 2025-03-03 13:48, Christian König wrote:
> Am 03.03.25 um 19:45 schrieb James Zhu:
>> before move to GTT domain.
> That might not be unnecessary. We sometimes intentionally move BOs to the CPU domain to invalidate all VM mappings.
We discussed this in our VM sync meeting this morning, and I wasn't 100% sure either. In this case it's causing a nearly live-lock of mutual evictions when two processes share the same BO and have both their eviction fences on the shared reservation object.
I was thinking the VM invalidation should be taken care of by the DMABuf move notifier, so this explicit invalidation seemed redundant. Is there a way we can test or otherwise verify that we're not missing anything?
Thanks,
Felix
>
> Christian.
>
>> Signed-off-by: James Zhu <James.Zhu@amd.com>
>> ---
>> drivers/gpu/drm/amd/amdgpu/amdgpu_amdkfd_gpuvm.c | 6 ------
>> 1 file changed, 6 deletions(-)
>>
>> diff --git a/drivers/gpu/drm/amd/amdgpu/amdgpu_amdkfd_gpuvm.c b/drivers/gpu/drm/amd/amdgpu/amdgpu_amdkfd_gpuvm.c
>> index 62ca12e94581..2ac6d4fa0601 100644
>> --- a/drivers/gpu/drm/amd/amdgpu/amdgpu_amdkfd_gpuvm.c
>> +++ b/drivers/gpu/drm/amd/amdgpu/amdgpu_amdkfd_gpuvm.c
>> @@ -595,12 +595,6 @@ kfd_mem_dmamap_dmabuf(struct kfd_mem_attachment *attachment)
>> {
>> struct ttm_operation_ctx ctx = {.interruptible = true};
>> struct amdgpu_bo *bo = attachment->bo_va->base.bo;
>> - int ret;
>> -
>> - amdgpu_bo_placement_from_domain(bo, AMDGPU_GEM_DOMAIN_CPU);
>> - ret = ttm_bo_validate(&bo->tbo, &bo->placement, &ctx);
>> - if (ret)
>> - return ret;
>>
>> amdgpu_bo_placement_from_domain(bo, AMDGPU_GEM_DOMAIN_GTT);
>> return ttm_bo_validate(&bo->tbo, &bo->placement, &ctx);
next prev parent reply other threads:[~2025-03-03 21:01 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
2025-03-03 18:45 [PATCH] drm/amdkfd: remove unnecessary cpu domain validation James Zhu
2025-03-03 18:48 ` Christian König
2025-03-03 21:01 ` Felix Kuehling [this message]
2025-03-04 10:38 ` Christian König
2025-03-04 15:18 ` Felix Kuehling
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=f487c2da-fa5f-4186-a556-005617d603b5@amd.com \
--to=felix.kuehling@amd.com \
--cc=James.Zhu@amd.com \
--cc=amd-gfx@lists.freedesktop.org \
--cc=christian.koenig@amd.com \
--cc=jamesz@amd.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