mbox series

[0/2] fdinfo shared stats

Message ID 20231207180225.439482-1-alexander.deucher@amd.com (mailing list archive)
Headers show
Series fdinfo shared stats | expand

Message

Alex Deucher Dec. 7, 2023, 6:02 p.m. UTC
We had a request to add shared buffer stats to fdinfo for amdgpu and
while implementing that, Christian mentioned that just looking at
the GEM handle count doesn't take into account buffers shared with other
subsystems like V4L or RDMA.  Those subsystems don't use GEM, so it
doesn't really matter from a GPU top perspective, but it's more
correct if you actually want to see shared buffers.

Alex Deucher (2):
  drm: update drm_show_memory_stats() for dma-bufs
  drm/amdgpu: add shared fdinfo stats

 drivers/gpu/drm/amd/amdgpu/amdgpu_fdinfo.c |  4 ++++
 drivers/gpu/drm/amd/amdgpu/amdgpu_object.c | 11 +++++++++++
 drivers/gpu/drm/amd/amdgpu/amdgpu_object.h |  6 ++++++
 drivers/gpu/drm/drm_file.c                 |  2 +-
 4 files changed, 22 insertions(+), 1 deletion(-)

Comments

Alex Deucher Dec. 13, 2023, 9:13 p.m. UTC | #1
On Thu, Dec 7, 2023 at 1:03 PM Alex Deucher <alexander.deucher@amd.com> wrote:
>
> We had a request to add shared buffer stats to fdinfo for amdgpu and
> while implementing that, Christian mentioned that just looking at
> the GEM handle count doesn't take into account buffers shared with other
> subsystems like V4L or RDMA.  Those subsystems don't use GEM, so it
> doesn't really matter from a GPU top perspective, but it's more
> correct if you actually want to see shared buffers.

Any thoughts on this?  Seem reasonable?

Alex

>
> Alex Deucher (2):
>   drm: update drm_show_memory_stats() for dma-bufs
>   drm/amdgpu: add shared fdinfo stats
>
>  drivers/gpu/drm/amd/amdgpu/amdgpu_fdinfo.c |  4 ++++
>  drivers/gpu/drm/amd/amdgpu/amdgpu_object.c | 11 +++++++++++
>  drivers/gpu/drm/amd/amdgpu/amdgpu_object.h |  6 ++++++
>  drivers/gpu/drm/drm_file.c                 |  2 +-
>  4 files changed, 22 insertions(+), 1 deletion(-)
>
> --
> 2.42.0
>
Alex Deucher Jan. 5, 2024, 9:03 p.m. UTC | #2
Ping on this series again?

Alex

On Wed, Dec 13, 2023 at 4:13 PM Alex Deucher <alexdeucher@gmail.com> wrote:
>
> On Thu, Dec 7, 2023 at 1:03 PM Alex Deucher <alexander.deucher@amd.com> wrote:
> >
> > We had a request to add shared buffer stats to fdinfo for amdgpu and
> > while implementing that, Christian mentioned that just looking at
> > the GEM handle count doesn't take into account buffers shared with other
> > subsystems like V4L or RDMA.  Those subsystems don't use GEM, so it
> > doesn't really matter from a GPU top perspective, but it's more
> > correct if you actually want to see shared buffers.
>
> Any thoughts on this?  Seem reasonable?
>
> Alex
>
> >
> > Alex Deucher (2):
> >   drm: update drm_show_memory_stats() for dma-bufs
> >   drm/amdgpu: add shared fdinfo stats
> >
> >  drivers/gpu/drm/amd/amdgpu/amdgpu_fdinfo.c |  4 ++++
> >  drivers/gpu/drm/amd/amdgpu/amdgpu_object.c | 11 +++++++++++
> >  drivers/gpu/drm/amd/amdgpu/amdgpu_object.h |  6 ++++++
> >  drivers/gpu/drm/drm_file.c                 |  2 +-
> >  4 files changed, 22 insertions(+), 1 deletion(-)
> >
> > --
> > 2.42.0
> >