[PATCH] drm/amdgpu: Use the TGID for trace_amdgpu_vm_update_ptes

Alex Deucher alexdeucher at gmail.com
Mon Feb 6 20:26:36 UTC 2023


Applied.  Thanks!

Alex

On Mon, Feb 6, 2023 at 3:35 AM Christian König <christian.koenig at amd.com> wrote:
>
>
>
> Am 02.02.23 um 17:21 schrieb Friedrich Vock:
> > The pid field corresponds to the result of gettid() in userspace.
> > However, userspace cannot reliably attribute PTE events to processes
> > with just the thread id. This patch allows userspace to easily
> > attribute PTE update events to specific processes by comparing this
> > field with the result of getpid().
> >
> > For attributing events to specific threads, the thread id is also
> > contained in the common fields of each trace event.
> >
> > Signed-off-by: Friedrich Vock <friedrich.vock at gmx.de>
>
> Ah, yes that makes more sense. Reviewed-by: Christian König
> <christian.koenig at amd.com>
>
> Alex do you pick this up or should I take care of it?
>
> Thanks,
> Christian.
>
> > ---
> >   drivers/gpu/drm/amd/amdgpu/amdgpu_vm_pt.c | 2 +-
> >   1 file changed, 1 insertion(+), 1 deletion(-)
> >
> > diff --git a/drivers/gpu/drm/amd/amdgpu/amdgpu_vm_pt.c b/drivers/gpu/drm/amd/amdgpu/amdgpu_vm_pt.c
> > index b5f3bba851db..01e42bdd8e4e 100644
> > --- a/drivers/gpu/drm/amd/amdgpu/amdgpu_vm_pt.c
> > +++ b/drivers/gpu/drm/amd/amdgpu/amdgpu_vm_pt.c
> > @@ -974,7 +974,7 @@ int amdgpu_vm_ptes_update(struct amdgpu_vm_update_params *params,
> >                       trace_amdgpu_vm_update_ptes(params, frag_start, upd_end,
> >                                                   min(nptes, 32u), dst, incr,
> >                                                   upd_flags,
> > -                                                 vm->task_info.pid,
> > +                                                 vm->task_info.tgid,
> >                                                   vm->immediate.fence_context);
> >                       amdgpu_vm_pte_update_flags(params, to_amdgpu_bo_vm(pt),
> >                                                  cursor.level, pe_start, dst,
> > --
> > 2.39.1
> >
>


More information about the amd-gfx mailing list