Intel-XE Archive on lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH 0/6 V3] fdinfo shared stats
@ 2024-01-30 16:12 Alex Deucher
  2024-01-30 16:12 ` [PATCH 1/6] Documentation/gpu: Update documentation on drm-shared-* Alex Deucher
                   ` (12 more replies)
  0 siblings, 13 replies; 20+ messages in thread
From: Alex Deucher @ 2024-01-30 16:12 UTC (permalink / raw)
  To: amd-gfx, dri-devel, intel-gfx, intel-xe, tvrtko.ursulin, daniel
  Cc: Alex Deucher

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.

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/drm_gem.c                  | 16 ++++++++++++++++
 drivers/gpu/drm/i915/i915_drm_client.c     |  2 +-
 drivers/gpu/drm/xe/xe_drm_client.c         |  2 +-
 include/drm/drm_gem.h                      |  1 +
 9 files changed, 42 insertions(+), 4 deletions(-)

-- 
2.42.0


^ permalink raw reply	[flat|nested] 20+ messages in thread
* [PATCH 0/6 V4] fdinfo shared stats
@ 2024-02-12 21:04 Alex Deucher
  2024-02-12 21:04 ` [PATCH 2/6] drm: add drm_gem_object_is_shared_for_memory_stats() helper Alex Deucher
  0 siblings, 1 reply; 20+ messages in thread
From: Alex Deucher @ 2024-02-12 21:04 UTC (permalink / raw)
  To: amd-gfx, dri-devel, intel-gfx, intel-xe, tvrtko.ursulin, daniel
  Cc: Alex Deucher

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(-)

-- 
2.42.0


^ permalink raw reply	[flat|nested] 20+ messages in thread

end of thread, other threads:[~2024-02-12 21:05 UTC | newest]

Thread overview: 20+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2024-01-30 16:12 [PATCH 0/6 V3] fdinfo shared stats Alex Deucher
2024-01-30 16:12 ` [PATCH 1/6] Documentation/gpu: Update documentation on drm-shared-* Alex Deucher
2024-01-30 16:22   ` Tvrtko Ursulin
2024-01-30 16:12 ` [PATCH 2/6] drm: add drm_gem_object_is_shared_for_memory_stats() helper Alex Deucher
2024-01-30 16:25   ` Tvrtko Ursulin
2024-01-30 17:11   ` Hamza Mahfooz
2024-01-30 16:12 ` [PATCH 3/6] drm: update drm_show_memory_stats() for dma-bufs Alex Deucher
2024-01-30 16:25   ` Tvrtko Ursulin
2024-01-30 16:12 ` [PATCH 4/6] drm/amdgpu: add shared fdinfo stats Alex Deucher
2024-01-30 16:12 ` [PATCH 5/6] drm/i915: Update shared stats to use the new gem helper Alex Deucher
2024-01-30 16:26   ` Tvrtko Ursulin
2024-01-30 16:12 ` [PATCH 6/6] drm/xe: " Alex Deucher
2024-01-30 19:49 ` ✓ CI.Patch_applied: success for fdinfo shared stats Patchwork
2024-01-30 19:49 ` ✗ CI.checkpatch: warning " Patchwork
2024-01-30 19:50 ` ✓ CI.KUnit: success " Patchwork
2024-01-30 19:57 ` ✓ CI.Build: " Patchwork
2024-01-30 19:58 ` ✓ CI.Hooks: " Patchwork
2024-01-30 19:59 ` ✗ CI.checksparse: warning " Patchwork
2024-01-30 20:44 ` ✓ CI.BAT: success " Patchwork
  -- strict thread matches above, loose matches on Subject: below --
2024-02-12 21:04 [PATCH 0/6 V4] " Alex Deucher
2024-02-12 21:04 ` [PATCH 2/6] drm: add drm_gem_object_is_shared_for_memory_stats() helper Alex Deucher

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox