From: "Christian König" <christian.koenig@amd.com>
To: "Liang, Prike" <Prike.Liang@amd.com>,
"tursulin@ursulin.net" <tursulin@ursulin.net>,
"Deucher, Alexander" <Alexander.Deucher@amd.com>,
"Mohan Marimuthu, Yogesh" <Yogesh.Mohanmarimuthu@amd.com>,
"SHANMUGAM, SRINIVASAN" <SRINIVASAN.SHANMUGAM@amd.com>,
"Khatri, Sunil" <Sunil.Khatri@amd.com>,
"amd-gfx@lists.freedesktop.org" <amd-gfx@lists.freedesktop.org>
Subject: Re: [PATCH 04/11] drm/amdgpu: completely rework eviction fence handling
Date: Tue, 17 Mar 2026 12:23:23 +0100 [thread overview]
Message-ID: <9bc4dbbc-1900-4620-9525-fd34a50fc565@amd.com> (raw)
In-Reply-To: <PH7PR12MB60009290374F2995C51FD4A1FB41A@PH7PR12MB6000.namprd12.prod.outlook.com>
On 3/17/26 12:21, Liang, Prike wrote:
> [Public]
>
> Regards,
> Prike
>
>> -----Original Message-----
>> From: Koenig, Christian <Christian.Koenig@amd.com>
>> Sent: Tuesday, March 17, 2026 5:57 PM
>> To: Liang, Prike <Prike.Liang@amd.com>; tursulin@ursulin.net; Deucher, Alexander
>> <Alexander.Deucher@amd.com>; Mohan Marimuthu, Yogesh
>> <Yogesh.Mohanmarimuthu@amd.com>; SHANMUGAM, SRINIVASAN
>> <SRINIVASAN.SHANMUGAM@amd.com>; Khatri, Sunil <Sunil.Khatri@amd.com>;
>> amd-gfx@lists.freedesktop.org
>> Subject: Re: [PATCH 04/11] drm/amdgpu: completely rework eviction fence handling
>>
>> On 3/13/26 09:28, Liang, Prike wrote:
>>>> +void amdgpu_evf_mgr_attach_fence(struct amdgpu_eviction_fence_mgr
>> *evf_mgr,
>>>> + struct amdgpu_bo *bo) {
>>>> + struct dma_fence *ev_fence = amdgpu_evf_mgr_get_fence(evf_mgr);
>>>> + struct dma_resv *resv = bo->tbo.base.resv;
>>>
>>> Before adding the attached fence, there requires allocating the reservation fence
>> slot first.
>>
>> No, the caller does that using the drm_exec.
>>
>> Additional to that it is way to late to do any memory allocation here since that could
>> cycle back and wait for us to attach the eviction fence.
>>
>> So by reserving a slot here you would just create a potential deadlock.
>
> Is possible pass the wrong fence number through the amdgpu_vm_lock_pd()/drm_exec_prepare_obj()? I saw the fence number assert error during attaching the reservation fence.
Yeah that is perfectly possible.
For kernel queues you need to have something like number_of_gang_members + 1 (for TTM) + 1 (for page table updates).
For user queues we probably need 1 (for TTM) + 1 (for page tables updates) + 1 (for the eviction fence).
Not sure if the calculation was really correct.
Regards,
Christian.
>
>> Regards,
>> Christian.
next prev parent reply other threads:[~2026-03-17 11:23 UTC|newest]
Thread overview: 42+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-03-10 19:13 [PATCH 01/11] drm/amdgpu: revert to old status lock handling v4 Christian König
2026-03-10 19:13 ` [PATCH 02/11] drm/amdgpu: restructure VM state machine Christian König
2026-03-11 8:47 ` Khatri, Sunil
2026-03-12 12:49 ` Christian König
2026-03-12 10:07 ` Liang, Prike
2026-03-12 14:32 ` Tvrtko Ursulin
2026-03-16 13:44 ` Christian König
2026-03-16 14:26 ` Tvrtko Ursulin
2026-03-10 19:13 ` [PATCH 03/11] drm/amdgpu: fix amdgpu_userq_evict Christian König
2026-03-11 8:51 ` Khatri, Sunil
2026-03-13 7:25 ` Liang, Prike
2026-03-10 19:13 ` [PATCH 04/11] drm/amdgpu: completely rework eviction fence handling Christian König
2026-03-11 12:27 ` Khatri, Sunil
2026-03-13 8:00 ` Khatri, Sunil
2026-03-17 9:41 ` Christian König
2026-03-13 8:28 ` Liang, Prike
2026-03-17 9:57 ` Christian König
2026-03-17 11:21 ` Liang, Prike
2026-03-17 11:23 ` Christian König [this message]
2026-03-17 11:54 ` Liang, Prike
2026-03-10 19:13 ` [PATCH 05/11] drm/amdgpu: fix eviction fence and userq manager shutdown Christian König
2026-03-11 12:26 ` Khatri, Sunil
2026-03-13 9:35 ` Khatri, Sunil
2026-03-10 19:13 ` [PATCH 06/11] drm/amdgpu: fix adding eviction fence Christian König
2026-03-11 12:26 ` Khatri, Sunil
2026-03-10 19:13 ` [PATCH 07/11] drm/amdgpu: rework amdgpu_userq_wait_ioctl v3 Christian König
2026-03-12 16:34 ` Tvrtko Ursulin
2026-03-16 14:19 ` Christian König
2026-03-16 14:44 ` Tvrtko Ursulin
2026-03-17 7:05 ` Khatri, Sunil
2026-03-10 19:13 ` [PATCH 08/11] drm/amdgpu: make amdgpu_user_wait_ioctl more resilent v2 Christian König
2026-03-17 7:15 ` Khatri, Sunil
2026-03-10 19:13 ` [PATCH 09/11] drm/amdgpu: annotate eviction fence signaling path Christian König
2026-03-17 7:35 ` Khatri, Sunil
2026-03-10 19:13 ` [PATCH 10/11] drm/amdgpu: fix some more bug in amdgpu_gem_va_ioctl Christian König
2026-03-17 8:44 ` Khatri, Sunil
2026-03-17 11:08 ` Christian König
2026-03-10 19:13 ` [PATCH 11/11] drm/amdgpu: WIP sync amdgpu_ttm_fill_mem only to kernel fences Christian König
2026-03-17 8:59 ` Khatri, Sunil
2026-03-17 10:52 ` Christian König
2026-03-11 7:43 ` [PATCH 01/11] drm/amdgpu: revert to old status lock handling v4 Khatri, Sunil
2026-03-12 7:13 ` Liang, Prike
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=9bc4dbbc-1900-4620-9525-fd34a50fc565@amd.com \
--to=christian.koenig@amd.com \
--cc=Alexander.Deucher@amd.com \
--cc=Prike.Liang@amd.com \
--cc=SRINIVASAN.SHANMUGAM@amd.com \
--cc=Sunil.Khatri@amd.com \
--cc=Yogesh.Mohanmarimuthu@amd.com \
--cc=amd-gfx@lists.freedesktop.org \
--cc=tursulin@ursulin.net \
/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