Skip to content

RFC 21st century intel_gpu_top

Tvrtko Ursulin intel-gfx 1 version In review

Get series with b4
b4 am [email protected]

Versions newest first

  1. v1 RFC Latest13 patches 3 repliesIn review

Patches in v1 No applies recorded yet

#Subject and filesSizeRepliesApplied
1/13drm/i915/pmu: Fix enable count array size and bounds checkingdrivers/gpu/drm/i915/i915_pmu.c drivers/gpu/drm/i915/intel_ringbuffer.h+10 -50 replies
2/13drm/i915: Keep a count of requests waiting for a slot on GPUdrivers/gpu/drm/i915/i915_gem.c drivers/gpu/drm/i915/i915_request.c drivers/gpu/drm/i915/intel_engine_cs.c +2 more+21 -20 replies
3/13drm/i915: Keep a count of requests submitted from userspacedrivers/gpu/drm/i915/i915_request.c drivers/gpu/drm/i915/intel_engine_cs.c drivers/gpu/drm/i915/intel_lrc.c +1 more+14 -10 replies
4/13drm/i915/pmu: Add queued counterdrivers/gpu/drm/i915/i915_pmu.c drivers/gpu/drm/i915/intel_ringbuffer.h include/uapi/drm/i915_drm.h+57 -120 replies
5/13drm/i915/pmu: Add runnable counterdrivers/gpu/drm/i915/i915_pmu.c drivers/gpu/drm/i915/intel_ringbuffer.h include/uapi/drm/i915_drm.h+25 -40 replies
6/13drm/i915/pmu: Add running counterdrivers/gpu/drm/i915/i915_pmu.c drivers/gpu/drm/i915/intel_ringbuffer.h include/uapi/drm/i915_drm.h+24 -30 replies
7/13drm/i915: Store engine backpointer in the intel_contextdrivers/gpu/drm/i915/i915_gem_context.c drivers/gpu/drm/i915/i915_gem_context.h+2 -00 replies
8/13drm/i915: Move intel_engine_context_in/out into intel_lrc.cdrivers/gpu/drm/i915/intel_lrc.c drivers/gpu/drm/i915/intel_ringbuffer.h+57 -550 replies
9/13drm/i915: Track per-context engine busynessdrivers/gpu/drm/i915/i915_gem_context.c drivers/gpu/drm/i915/i915_gem_context.h drivers/gpu/drm/i915/intel_engine_cs.c +1 more+97 -100 replies
10/13drm/i915: Expose list of clients in sysfsdrivers/gpu/drm/i915/i915_drv.h drivers/gpu/drm/i915/i915_gem.c drivers/gpu/drm/i915/i915_sysfs.c+140 -80 replies
11/13drm/i915: Update client name on context createdrivers/gpu/drm/i915/i915_drv.h drivers/gpu/drm/i915/i915_gem.c drivers/gpu/drm/i915/i915_gem_context.c+23 -50 replies
12/13drm/i915: Expose per-engine client busynessdrivers/gpu/drm/i915/i915_drv.h drivers/gpu/drm/i915/i915_gem.c+86 -30 replies
13/13drm/i915: Add sysfs toggle to enable per-client engine statsdrivers/gpu/drm/i915/i915_drv.h drivers/gpu/drm/i915/i915_sysfs.c+77 -00 replies

Reviews trailers per patch

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

Read the v1 thread

Cover letter [RFC 00/13] 21st century intel_gpu_top

From: Tvrtko Ursulin <[email protected]>

A collection of patches which I have been sending before, sometimes together and sometimes separately, which enable intel_gpu_top to report queue depths (also translates as overall GPU load average) and per DRM client per engine busyness.

This enables a fancy intel_gpu_top which looks like this (a picture is worth a thousand words):

intel-gpu-top - load avg 3.30, 1.51, 0.08; 949/ 949 MHz; 0% RC6; 14.66 Watts; 3605 irqs/s

IMC reads: 4651 MiB/s
IMC writes: 25 MiB/s

ENGINE BUSY Q r R MI_SEMA MI_WAIT
Render/3D/0 61.51% |█████████████████████████████████████████████▌ | 3 0 1 0% 0%
Blitter/0 0.00% | | 0 0 0 0% 0%
Video/0 60.86% |█████████████████████████████████████████████ | 1 0 1 0% 0%
Video/1 59.04% |███████████████████████████████████████████▋ | 1 0 1 0% 0%
VideoEnhance/0 0.00% | | 0 0 0 0% 0%

PID NAME Render/3D/0 Blitter/0 Video/0 Video/1 VideoEnhance/0

23373        gem_wsim |█████▎              ||                    ||████████▍           ||█████▎              ||                    |
23374        gem_wsim |███▉                ||                    ||██▏                 ||███                 ||                    |
23375        gem_wsim |███                 ||                    ||█▍                  ||███▌                ||                    |

All of this work actually came to be via different feature requests not directly asking for this. Things like engine queue depth query and per context engine busyness ioctl. Those bits need userspace which is not there yet and so I have removed them from this posting to avoid confusion.

What remains is a set of patches which add some PMU counters and a completely new sysfs interface to enable intel_gpu_top to read the per client stats.

IGT counterpart will be sent separately.

Tvrtko Ursulin (13):
drm/i915/pmu: Fix enable count array size and bounds checking drm/i915: Keep a count of requests waiting for a slot on GPU drm/i915: Keep a count of requests submitted from userspace drm/i915/pmu: Add queued counter
drm/i915/pmu: Add runnable counter
drm/i915/pmu: Add running counter
drm/i915: Store engine backpointer in the intel_context drm/i915: Move intel_engine_context_in/out into intel_lrc.c drm/i915: Track per-context engine busyness drm/i915: Expose list of clients in sysfs
drm/i915: Update client name on context create drm/i915: Expose per-engine client busyness drm/i915: Add sysfs toggle to enable per-client engine stats

 drivers/gpu/drm/i915/i915_drv.h         |  39 +++++
 drivers/gpu/drm/i915/i915_gem.c         | 197 +++++++++++++++++++++++-
 drivers/gpu/drm/i915/i915_gem_context.c |  18 ++-
 drivers/gpu/drm/i915/i915_gem_context.h |  18 +++
 drivers/gpu/drm/i915/i915_pmu.c         | 103 +++++++++++--
 drivers/gpu/drm/i915/i915_request.c     |  10 ++
 drivers/gpu/drm/i915/i915_sysfs.c       |  81 ++++++++++
 drivers/gpu/drm/i915/intel_engine_cs.c  |  33 +++-
 drivers/gpu/drm/i915/intel_lrc.c        | 109 ++++++++++++-
 drivers/gpu/drm/i915/intel_ringbuffer.h |  76 +++------
 include/uapi/drm/i915_drm.h             |  19 ++-
 11 files changed, 614 insertions(+), 89 deletions(-)
Signature · 6 lines
2.17.1

_______________________________________________
Intel-gfx mailing list
[email protected]
https://lists.freedesktop.org/mailman/listinfo/intel-gfx