[RFC 0/6] Per context and per client GPU busyness tracking

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



From: Tvrtko Ursulin <tvrtko.ursulin@xxxxxxxxx>

Continuation of the old feature work, rebased to latest drm-tip and adapted to
expose data per engine class - making it compatible with the upcoming Virtual
Engine uapi.

Patch series adds core per context (intel_context) engine busyness tracking and
then also exports this data in sysfs, aggregated to per client and per engine
class.

Exported directory structure looks like this:

root@sc:/sys/class/drm/card0# grep  . -r clients/
clients/21/busy/3:0
clients/21/busy/1:0
clients/21/busy/2:24712242825
clients/21/busy/0:7830006484
clients/21/pid:5989
clients/21/name:gem_wsim
clients/22/busy/3:0
clients/22/busy/1:2778102816
clients/22/busy/2:0
clients/22/busy/0:14434594580
clients/22/pid:5991
clients/22/name:gem_wsim
clients/enable_stats:1

Each client has an opaque unique id named directory, under which are its name,
pid, and another subdirectory containing accumulated engine busyness per engine
class in nanoseconds.

Example output from extended intel_gpu_top:

==========================================================================
intel-gpu-top -  935/ 935 MHz;    0% RC6; 14.73 Watts;     1097 irqs/s

      IMC reads:     1401 MiB/s
     IMC writes:        4 MiB/s

          ENGINE      BUSY                                 MI_SEMA MI_WAIT
     Render/3D/0   63.73% |███████████████████           |      3%      0%
       Blitter/0    9.53% |██▊                           |      6%      0%
         Video/0   39.32% |███████████▊                  |     16%      0%
         Video/1   15.62% |████▋                         |      0%      0%
  VideoEnhance/0    0.00% |                              |      0%      0%

  PID            NAME     RCS          BCS          VCS         VECS
 4084        gem_wsim |█████▌     ||█          ||           ||           |
 4086        gem_wsim |█▌         ||           ||███        ||           |
==========================================================================

Tvrtko Ursulin (6):
  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/gt/intel_context.c       |  21 ++
 drivers/gpu/drm/i915/gt/intel_context.h       |   9 +
 drivers/gpu/drm/i915/gt/intel_context_types.h |   9 +
 drivers/gpu/drm/i915/gt/intel_engine.h        |  55 -----
 drivers/gpu/drm/i915/gt/intel_engine_cs.c     |   8 +
 drivers/gpu/drm/i915/gt/intel_lrc.c           | 107 ++++++++-
 drivers/gpu/drm/i915/i915_drv.h               |  39 ++++
 drivers/gpu/drm/i915/i915_gem.c               | 215 +++++++++++++++++-
 drivers/gpu/drm/i915/i915_gem_context.c       |  18 +-
 drivers/gpu/drm/i915/i915_sysfs.c             |  81 +++++++
 10 files changed, 492 insertions(+), 70 deletions(-)

-- 
2.19.1

_______________________________________________
Intel-gfx mailing list
Intel-gfx@xxxxxxxxxxxxxxxxxxxxx
https://lists.freedesktop.org/mailman/listinfo/intel-gfx




[Index of Archives]     [AMD Graphics]     [Linux USB Devel]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]

  Powered by Linux