[PATCH 3/4] drm/amdgpu: trace the scheduler dependent job fence name

Liang, Prike Prike.Liang at amd.com
Wed Apr 16 14:16:50 UTC 2025


[Public]

> From: Koenig, Christian <Christian.Koenig at amd.com>
> Sent: Wednesday, April 16, 2025 7:04 PM
> To: Liang, Prike <Prike.Liang at amd.com>; amd-gfx at lists.freedesktop.org
> Cc: Deucher, Alexander <Alexander.Deucher at 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.

> Regards,
> Christian.
>
> >
> > Signed-off-by: Prike Liang <Prike.Liang at 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)
> >  );



More information about the amd-gfx mailing list