Skip to content

RFC Add capacity key to fdinfo

Tvrtko Ursulin amd-gfx 1 version In review

Get series with b4
b4 am [email protected]

Versions newest first

  1. v1 RFC Latest5 patches 13 repliesIn review

Patches in v1 No applies recorded yet

#Subject and filesSizeRepliesApplied
1/5drm/amdgpu: Cache number of rings per hw ip typedrivers/gpu/drm/amd/amdgpu/amdgpu.h drivers/gpu/drm/amd/amdgpu/amdgpu_device.c+15 -00 replies
2/5drm/amdgpu: Use cached number of rings from the AMDGPU_INFO_HW_IP_INFO ioctldrivers/gpu/drm/amd/amdgpu/amdgpu_kms.c+6 -560 replies
3/5drm/amdgpu: Skip not present rings in amdgpu_ctx_mgr_usagedrivers/gpu/drm/amd/amdgpu/amdgpu_ctx.c+3 -00 replies
4/5drm/amdgpu: Show engine capacity in fdinfodrivers/gpu/drm/amd/amdgpu/amdgpu_fdinfo.c+8 -20 replies
5/5drm/amdgpu: Only show VRAM in fdinfo if it existsdrivers/gpu/drm/amd/amdgpu/amdgpu_fdinfo.c+17 -125 replies

Reviews trailers per patch

No Reviewed-by, Acked-by or Tested-by trailers for v1 yet.

Read the v1 thread

Cover letter [RFC 0/5] Add capacity key to fdinfo

From: Tvrtko Ursulin <[email protected]>

I have noticed AMD GPUs can have more than one "engine" (ring?) of the same type but amdgpu is not reporting that in fdinfo using the capacity engine tag.

This series is therefore an attempt to improve that, but only an RFC since it is quite likely I got stuff wrong on the first attempt. Or if not wrong it may not be very beneficial in AMDs case.

So I tried to figure out how to count and store the number of instances of an "engine" type and spotted that could perhaps be used in more than one place in the driver. I was more than a little bit confused by the ip_instance and uapi rings, then how rings are selected to context entities internally. Anyway.. hopefully it is a simple enough series to easily spot any such large misses.

End result should be that, assuming two "engine" instances, one fully loaded and one idle will only report client using 50% of that engine type.

Tvrtko Ursulin (5):
drm/amdgpu: Cache number of rings per hw ip type drm/amdgpu: Use cached number of rings from the AMDGPU_INFO_HW_IP_INFO
ioctl
drm/amdgpu: Skip not present rings in amdgpu_ctx_mgr_usage drm/amdgpu: Show engine capacity in fdinfo
drm/amdgpu: Only show VRAM in fdinfo if it exists

 drivers/gpu/drm/amd/amdgpu/amdgpu.h        |  1 +
 drivers/gpu/drm/amd/amdgpu/amdgpu_ctx.c    |  3 ++
 drivers/gpu/drm/amd/amdgpu/amdgpu_device.c | 14 +++++
 drivers/gpu/drm/amd/amdgpu/amdgpu_fdinfo.c | 39 +++++++++-----
 drivers/gpu/drm/amd/amdgpu/amdgpu_kms.c    | 62 +++-------------------
 5 files changed, 49 insertions(+), 70 deletions(-)
Signature · 1 line
2.44.0