Skip to content

Per client GPU utilisation

Tvrtko Ursulin dri-devel intel-gfx 1 version New

Get series with b4
b4 am [email protected]

Versions newest first

  1. v1 Latest8 patches 0 repliesNew

v2 from the cover letter

* Added prototype of possible amdgpu changes and spec updates to align with the common spec.

Patches in v1 No applies recorded yet

#Subject and filesSizeRepliesApplied
1/8drm/i915: Explicitly track DRM clientsdrivers/gpu/drm/i915/Makefile drivers/gpu/drm/i915/i915_driver.c drivers/gpu/drm/i915/i915_drm_client.c +4 more+149 -30 replies
2/8drm/i915: Make GEM contexts track DRM clientsdrivers/gpu/drm/i915/gem/i915_gem_context.c drivers/gpu/drm/i915/gem/i915_gem_context_types.h+8 -00 replies
3/8drm/i915: Track runtime spent in closed and unreachable GEM contextsdrivers/gpu/drm/i915/gem/i915_gem_context.c drivers/gpu/drm/i915/i915_drm_client.h+32 -20 replies
4/8drm/i915: Track all user contexts per clientdrivers/gpu/drm/i915/gem/i915_gem_context.c drivers/gpu/drm/i915/gem/i915_gem_context_types.h drivers/gpu/drm/i915/i915_drm_client.c +1 more+23 -00 replies
5/8drm/i915: Track context current active timedrivers/gpu/drm/i915/gt/intel_context.c drivers/gpu/drm/i915/gt/intel_context.h drivers/gpu/drm/i915/gt/intel_context_types.h +7 more+118 -500 replies
6/8drm: Document fdinfo format specificationDocumentation/gpu/drm-usage-stats.rst Documentation/gpu/index.rst+107 -00 replies
7/8drm/i915: Count engine instances per uabi classdrivers/gpu/drm/i915/gt/intel_engine_user.c drivers/gpu/drm/i915/i915_drv.h+7 -50 replies
8/8drm/i915: Expose client engine utilisation via fdinfoDocumentation/gpu/drm-usage-stats.rst Documentation/gpu/i915.rst drivers/gpu/drm/i915/i915_driver.c +2 more+122 -00 replies

Reviews trailers per patch

All 8 patches have a Reviewed-by or Acked-by.

PatchChris WilsonAravind IddamsettyUmesh Nerlige RamappaChristian König
1/8R-b R-b R-b
2/8R-b R-b R-b
3/8R-b R-b R-b
4/8R-b R-b R-b
5/8R-b R-b R-b
6/8R-b A-b
7/8R-b
8/8R-b A-b

Trailers given in replies are filled; those carried in the patches from earlier versions are outlined with dashes. Scroll the table sideways for all 4 reviewers.

Read the v1 thread

Cover letter [PATCH 0/8] Per client GPU utilisation

From: Tvrtko Ursulin <[email protected]>

Just a rebase - fully reviewed now.

Example of the intel_gpu_top output:
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
intel-gpu-top: Intel Tigerlake (Gen12) @ /dev/dri/card0 - 220/ 221 MHz
70% RC6; 0.62/ 7.08 W; 760 irqs/s

ENGINES BUSY MI_SEMA MI_WAIT
Render/3D 23.06% |██████▊ | 0% 0%
Blitter 0.00% | | 0% 0%
Video 5.40% |█▋ | 0% 0%
VideoEnhance 20.67% |██████ | 0% 0%

PID NAME Render/3D Blitter Video VideoEnhance

  3082               mpv |          ||          ||▌         ||██        |
  3117         neverball |█▉        ||          ||          ||          |
     1           systemd |▍         ||          ||          ||          |
  2338       gnome-shell |          ||          ||          ||          |

~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

Example of the gputop output:
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
DRM minor 0

    PID               NAME    render       copy       video
    3816          kwin_x11 |███▎      ||          ||          ||          |
    3523              Xorg |▊         ||          ||          ||          |
 1120449               mpv |          ||          ||▋         ||          |
 1120529          glxgears |▋         ||          ||          ||          |
 1120449               mpv |▍         ||          ||          ||          |
    3860       plasmashell |▏         ||          ||          ||          |
    4764           krunner |          ||          ||          ||          |
  575206            chrome |          ||          ||          ||          |
  833481           firefox |          ||          ||          ||          |
  892924       thunderbird |          ||          ||          ||          |

~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

v2:
* Added prototype of possible amdgpu changes and spec updates to align with the common spec.

v3:
* Documented that 'drm-driver' tag shall correspond with struct drm_driver.name.

v4:
* Dropped amdgpu conversion from the series for now until AMD folks can find some time to finish that patch.

v5:
* Added drm-engine-capacity-* tag.
* Couple small tweaks.

v6:
* Just a rebase and r-b tags updated.

Test-with: [email protected]

Tvrtko Ursulin (8):
drm/i915: Explicitly track DRM clients
drm/i915: Make GEM contexts track DRM clients
drm/i915: Track runtime spent in closed and unreachable GEM contexts drm/i915: Track all user contexts per client
drm/i915: Track context current active time
drm: Document fdinfo format specification
drm/i915: Count engine instances per uabi class
drm/i915: Expose client engine utilisation via fdinfo

 Documentation/gpu/drm-usage-stats.rst         | 112 +++++++++++++
 Documentation/gpu/i915.rst                    |  28 ++++
 Documentation/gpu/index.rst                   |   1 +
 drivers/gpu/drm/i915/Makefile                 |   1 +
 drivers/gpu/drm/i915/gem/i915_gem_context.c   |  43 ++++-
 .../gpu/drm/i915/gem/i915_gem_context_types.h |   6 +
 drivers/gpu/drm/i915/gt/intel_context.c       |  27 +++-
 drivers/gpu/drm/i915/gt/intel_context.h       |  15 +-
 drivers/gpu/drm/i915/gt/intel_context_types.h |  24 ++-
 drivers/gpu/drm/i915/gt/intel_engine_user.c   |  11 +-
 .../drm/i915/gt/intel_execlists_submission.c  |  23 ++-
 .../gpu/drm/i915/gt/intel_gt_clock_utils.c    |   4 +
 drivers/gpu/drm/i915/gt/intel_lrc.c           |  27 ++--
 drivers/gpu/drm/i915/gt/intel_lrc.h           |  27 +++-
 drivers/gpu/drm/i915/gt/selftest_lrc.c        |  10 +-
 drivers/gpu/drm/i915/i915_driver.c            |   9 ++
 drivers/gpu/drm/i915/i915_drm_client.c        | 151 ++++++++++++++++++
 drivers/gpu/drm/i915/i915_drm_client.h        |  68 ++++++++
 drivers/gpu/drm/i915/i915_drv.h               |   4 +
 drivers/gpu/drm/i915/i915_file_private.h      |   3 +
 drivers/gpu/drm/i915/i915_gem.c               |  21 ++-
 drivers/gpu/drm/i915/i915_gpu_error.c         |   9 +-
 drivers/gpu/drm/i915/i915_gpu_error.h         |   2 +-
 23 files changed, 566 insertions(+), 60 deletions(-)
 create mode 100644 Documentation/gpu/drm-usage-stats.rst
 create mode 100644 drivers/gpu/drm/i915/i915_drm_client.c
 create mode 100644 drivers/gpu/drm/i915/i915_drm_client.h
Signature · 1 line
2.32.0