From: "Christian König" <ckoenig.leichtzumerken@gmail.com>
To: "Liang, Prike" <Prike.Liang@amd.com>,
"Koenig, Christian" <Christian.Koenig@amd.com>,
"amd-gfx@lists.freedesktop.org" <amd-gfx@lists.freedesktop.org>
Cc: "Deucher, Alexander" <Alexander.Deucher@amd.com>
Subject: Re: [PATCH 3/4] drm/amdgpu: trace the scheduler dependent job fence name
Date: Thu, 17 Apr 2025 09:35:04 +0200 [thread overview]
Message-ID: <da07f6a6-5270-4cbf-a319-e20c82d3a1ea@gmail.com> (raw)
In-Reply-To: <DS7PR12MB60053AACAD58864072A3F513FBBD2@DS7PR12MB6005.namprd12.prod.outlook.com>
Am 16.04.25 um 16:16 schrieb Liang, Prike:
> [Public]
>
>> From: Koenig, Christian <Christian.Koenig@amd.com>
>> Sent: Wednesday, April 16, 2025 7:04 PM
>> To: Liang, Prike <Prike.Liang@amd.com>; amd-gfx@lists.freedesktop.org
>> Cc: Deucher, Alexander <Alexander.Deucher@amd.com>
>> Subject: Re: [PATCH 3/4] drm/amdgpu: trace the scheduler dependent job fence
>> name
>>
>> Am 16.04.25 um 10:50 schrieb Prike Liang:
>>> This trace will help in tracking the scheduler dependent job fence.
>> Changes for general DRM code need to got o the appropriate mailing list.
> Yes, it should be sent to dri-dev group.
>
>> Apart from that IIRC we intentionally didn't do that. Why should the driver name be
>> relevant here?
> By adding the scheduler-dependent fence name dump, this can help identify which exact fence is depended on by the scheduler job. With this dump, successfully catch the case about the SDMA and GFX kernel queue scheduled jobs that are dependent on the eviction fence when enabling the kq and uq at the same time.
Mhm, I see why you want to make that shortcut but we kind of agreed to identify fences in the scheduler always as context:seqno.
If you then want the driver/timeline names for that you should probably enable the fence trace points as well.
We are trying to reduce the accesses to those names to eventually allow dma_fence destruction independent of the driver module.
Regards,
Christian.
>
>> Regards,
>> Christian.
>>
>>> Signed-off-by: Prike Liang <Prike.Liang@amd.com>
>>> ---
>>> drivers/gpu/drm/scheduler/gpu_scheduler_trace.h | 5 ++++-
>>> 1 file changed, 4 insertions(+), 1 deletion(-)
>>>
>>> diff --git a/drivers/gpu/drm/scheduler/gpu_scheduler_trace.h
>>> b/drivers/gpu/drm/scheduler/gpu_scheduler_trace.h
>>> index c75302ca3427..473a2cbbd7bd 100644
>>> --- a/drivers/gpu/drm/scheduler/gpu_scheduler_trace.h
>>> +++ b/drivers/gpu/drm/scheduler/gpu_scheduler_trace.h
>>> @@ -91,6 +91,7 @@ TRACE_EVENT(drm_sched_job_wait_dep,
>>> __field(struct dma_fence *, fence)
>>> __field(uint64_t, ctx)
>>> __field(unsigned, seqno)
>>> + __string(dep_fence_name, fence->ops-
>>> get_driver_name(fence))
>>> ),
>>>
>>> TP_fast_assign(
>>> @@ -99,9 +100,11 @@ TRACE_EVENT(drm_sched_job_wait_dep,
>>> __entry->fence = fence;
>>> __entry->ctx = fence->context;
>>> __entry->seqno = fence->seqno;
>>> + __assign_str(dep_fence_name);
>>> ),
>>> - TP_printk("job ring=%s, id=%llu, depends fence=%p, context=%llu,
>> seq=%u",
>>> + TP_printk("job ring=%s, id=%llu, depends fence(name: %s) addr
>>> +=%p, context=%llu, seq=%u",
>>> __get_str(name), __entry->id,
>>> + __get_str(dep_fence_name),
>>> __entry->fence, __entry->ctx,
>>> __entry->seqno)
>>> );
next prev parent reply other threads:[~2025-04-17 7:35 UTC|newest]
Thread overview: 21+ messages / expand[flat|nested] mbox.gz Atom feed top
2025-04-16 8:50 [PATCH 1/4] drm/amdgpu: add the evf attached gem obj resv dump Prike Liang
2025-04-16 8:50 ` [PATCH 2/4] drm/amdgpu: set the evf name to identify the userq case Prike Liang
2025-04-16 11:02 ` Christian König
2025-04-16 12:56 ` Liang, Prike
2025-04-16 8:50 ` [PATCH 3/4] drm/amdgpu: trace the scheduler dependent job fence name Prike Liang
2025-04-16 11:04 ` Christian König
2025-04-16 14:16 ` Liang, Prike
2025-04-17 7:35 ` Christian König [this message]
2025-04-16 8:50 ` [PATCH 4/4] drm/amdgpu: free the evf when the attached bo release Prike Liang
2025-04-16 11:07 ` Christian König
2025-04-16 14:47 ` Liang, Prike
2025-04-17 7:39 ` Christian König
2025-04-22 9:14 ` Liang, Prike
2025-04-22 9:27 ` Christian König
2025-04-22 12:39 ` Yadav, Arvind
2025-04-22 13:09 ` Liang, Prike
2025-04-22 13:26 ` Christian König
2025-04-23 3:25 ` Liang, Prike
2025-04-16 11:01 ` [PATCH 1/4] drm/amdgpu: add the evf attached gem obj resv dump Christian König
2025-04-16 12:54 ` Liang, Prike
2025-04-16 12:58 ` Christian König
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=da07f6a6-5270-4cbf-a319-e20c82d3a1ea@gmail.com \
--to=ckoenig.leichtzumerken@gmail.com \
--cc=Alexander.Deucher@amd.com \
--cc=Christian.Koenig@amd.com \
--cc=Prike.Liang@amd.com \
--cc=amd-gfx@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 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.