Skip to content

gputop: Support accel devices

Gyeyoung Baek igt-dev 1 version New

Get series with b4
b4 am [email protected]

Versions newest first

  1. v1 Latest3 patches 0 repliesNew

Patches in v1 No applies recorded yet

#Subject and filesSizeRepliesApplied
1/3lib/igt_drm_clients: Track clients by dev_t instead of DRM minorlib/igt_drm_clients.c lib/igt_drm_clients.h tools/gputop.c+49 -540 replies
2/3lib/igt_drm_clients: Also scan accel device nodeslib/igt_drm_clients.c lib/igt_drm_clients.h+11 -60 replies
3/3tools/gputop: Show device node and driver name in client headerlib/igt_drm_clients.c lib/igt_drm_clients.h tools/gputop.c+32 -30 replies

Reviews trailers per patch

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

Read the v1 thread

Cover letter [PATCH i-g-t 0/3] gputop: Support accel devices

Make gputop show the clients of accel devices (/dev/accel/*) too.

Accel drivers print the same drm-usage-stats fdinfo as DRM drivers through drm_show_fdinfo() in the DRM core, but igt_drm_clients only scans DRM nodes (major 226), so they never show up in gputop.

- Patch 1 extends the client identifier from the minor to dev_t (no functional change).
- Patch 2 also scans accel nodes (major 261).
- Patch 3 shows the device node and driver name in the client header instead of "DRM minor N".

Tested on RK3588 (Rock 5B+) with panthor (GPU) and rocket (NPU) running at the same time, on drm-misc-next plus the rocket fdinfo series [1] (bars trimmed):

renderD128 (panthor)
PID MEM RSS panthor NAME
727 9M 9M 100.0% gpuload
accel0 (rocket)

  PID      MEM      RSS      npu  NAME
  724      23M       0B    14.7%  benchmark_model

Not tested on Intel hardware (patch 1, Intel frequency sysfs path:
/sys/class/drm/cardN -> /sys/dev/char/<major>:<minor>).

[1] https://lore.kernel.org/all/[email protected]/

Gyeyoung Baek (3):
lib/igt_drm_clients: Track clients by dev_t instead of DRM minor lib/igt_drm_clients: Also scan accel device nodes tools/gputop: Show device node and driver name in client header

 lib/igt_drm_clients.c |  41 ++++++++++-------
 lib/igt_drm_clients.h |   4 +-
 tools/gputop.c        | 102 +++++++++++++++++++++++++-----------------
 3 files changed, 88 insertions(+), 59 deletions(-)
Signature · 1 line
2.43.0