Skip to content

fdinfo shared stats

Alex Deucher amd-gfx dri-devel intel-gfx intel-xe 3 versions – In review

Get series with b4
b4 am [email protected]

Versions newest first · linked by author and title

  1. v4 Latest6 patches 3 repliesIn review
  2. v36 patches 5 repliesSuperseded
  3. v12 patches 12 repliesSuperseded

Patches in v4 No applies recorded yet

#Subject and filesSizeRepliesApplied
1/6Documentation/gpu: Update documentation on drm-shared-*Documentation/gpu/drm-usage-stats.rst+1 -10 replies
2/6drm: add drm_gem_object_is_shared_for_memory_stats() helperinclude/drm/drm_gem.h+13 -00 replies
3/6drm: update drm_show_memory_stats() for dma-bufsdrivers/gpu/drm/drm_file.c+1 -10 replies
4/6drm/amdgpu: add shared fdinfo statsdrivers/gpu/drm/amd/amdgpu/amdgpu_fdinfo.c drivers/gpu/drm/amd/amdgpu/amdgpu_object.c drivers/gpu/drm/amd/amdgpu/amdgpu_object.h+21 -00 replies
5/6drm/i915: Update shared stats to use the new gem helperdrivers/gpu/drm/i915/i915_drm_client.c+1 -10 replies
6/6drm/xe: Update shared stats to use the new gem helperdrivers/gpu/drm/xe/xe_drm_client.c+1 -10 replies

Reviews trailers per patch

4 of 6 patches have a Reviewed-by or Acked-by.

PatchTvrtko UrsulinRob Clark
1/6R-b
2/6R-b
3/6R-b R-b
4/6
5/6R-b
6/6

Trailers given in replies are filled; those carried in the patches from earlier versions are outlined with dashes.

Read the v4 thread

Cover letter [PATCH 0/6 V4] fdinfo shared stats

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.

After further discussions, add a helper and update all fdinfo implementations to use that helper for consistency.

v4: switch drm_gem_object_is_shared_for_memory_stats() to an inline function

Alex Deucher (6):
Documentation/gpu: Update documentation on drm-shared-*
drm: add drm_gem_object_is_shared_for_memory_stats() helper
drm: update drm_show_memory_stats() for dma-bufs drm/amdgpu: add shared fdinfo stats
drm/i915: Update shared stats to use the new gem helper drm/xe: Update shared stats to use the new gem helper

 Documentation/gpu/drm-usage-stats.rst      |  2 +-
 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 +-
 drivers/gpu/drm/i915/i915_drm_client.c     |  2 +-
 drivers/gpu/drm/xe/xe_drm_client.c         |  2 +-
 include/drm/drm_gem.h                      | 13 +++++++++++++
 8 files changed, 38 insertions(+), 4 deletions(-)
Signature · 1 line
2.42.0