[Intel-gfx] [RFC 0/8] Per client GPU stats

Tvrtko Ursulin tvrtko.ursulin at linux.intel.com
Fri Jul 23 11:21:12 UTC 2021


On 15/07/2021 10:18, Tvrtko Ursulin wrote:
> From: Tvrtko Ursulin <tvrtko.ursulin at intel.com>
> 
> Same old work but now rebased and series ending with some DRM docs proposing
> the common specification which should enable nice common userspace tools to be
> written.
> 
> For the moment I only have intel_gpu_top converted to use this and that seems to
> work okay.
> 
> v2:
>   * Added prototype of possible amdgpu changes and spec updates to align with the
>     common spec.

Not much interest for the common specification?

For reference I've just posted the intel-gpu-top adaptation required to parse it here: https://patchwork.freedesktop.org/patch/446041/?series=90464&rev=2.

Note that this is not attempting to be a vendor agnostic tool but is adding per client data to existing i915 tool which uses PMU counters for global stats.

intel-gpu-top: Intel Skylake (Gen9) @ /dev/dri/card0 -  335/ 339 MHz;  10% RC6;  1.24/ 4.18 W;      527 irqs/s

       IMC reads:     3297 MiB/s
      IMC writes:     2767 MiB/s

          ENGINES     BUSY                                                                                                  MI_SEMA MI_WAIT
        Render/3D   78.74% |██████████████████████████████████████████████████████████████████████████▏                   |      0%      0%
          Blitter    0.00% |                                                                                              |      0%      0%
            Video    0.00% |                                                                                              |      0%      0%
     VideoEnhance    0.00% |                                                                                              |      0%      0%

    PID              NAME          Render/3D                    Blitter                      Video                    VideoEnhance
  10202         neverball |███████████████▎          ||                          ||                          ||                          |
   5665              Xorg |███████▍                  ||                          ||                          ||                          |
   5679     xfce4-session |                          ||                          ||                          ||                          |
   5772      ibus-ui-gtk3 |                          ||                          ||                          ||                          |
   5775   ibus-extension- |                          ||                          ||                          ||                          |
   5777          ibus-x11 |                          ||                          ||                          ||                          |
   5823             xfwm4 |                          ||                          ||                          ||                          |


Regards,

Tvrtko
  
> 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: Expose client engine utilisation via fdinfo
>    drm/amdgpu: Convert to common fdinfo format
> 
>   Documentation/gpu/amdgpu.rst                  |  26 ++++
>   Documentation/gpu/drm-usage-stats.rst         | 108 +++++++++++++
>   Documentation/gpu/i915.rst                    |  27 ++++
>   Documentation/gpu/index.rst                   |   1 +
>   drivers/gpu/drm/amd/amdgpu/amdgpu_fdinfo.c    |  18 ++-
>   drivers/gpu/drm/i915/Makefile                 |   5 +-
>   drivers/gpu/drm/i915/gem/i915_gem_context.c   |  42 ++++-
>   .../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 ++-
>   .../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           |  24 +++
>   drivers/gpu/drm/i915/gt/selftest_lrc.c        |  10 +-
>   drivers/gpu/drm/i915/i915_drm_client.c        | 143 ++++++++++++++++++
>   drivers/gpu/drm/i915/i915_drm_client.h        |  66 ++++++++
>   drivers/gpu/drm/i915/i915_drv.c               |   9 ++
>   drivers/gpu/drm/i915/i915_drv.h               |   5 +
>   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, 581 insertions(+), 61 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
> 


More information about the Intel-gfx mailing list