[igt-dev] [RFC v4 0/7] Per-context and per-client engine busyness

Tvrtko Ursulin tursulin at ursulin.net
Tue Apr 17 12:27:29 UTC 2018


From: Tvrtko Ursulin <tvrtko.ursulin at intel.com>

Another re-post of my earlier, now slightly updated work, to expose a DRM client
hierarchy in sysfs in order to enable a top like tool:

intel-gpu-top - load avg 40.80, 27.11,  1.50;  882/ 950 MHz;    0% RC6;  13.26 Watts;   261903 irqs/s

      IMC reads:     5543 MiB/s
     IMC writes:      236 MiB/s

          ENGINE      BUSY                            QD     MI_SEMA MI_WAIT
     Render/3D/0    60.47% |███████████▍       |  28   0   1      0%      0%
       Blitter/0    92.70% |█████████████████▌ |   0   0   1      0%      0%
         Video/0   100.00% |███████████████████|  15  37   2      0%      0%
         Video/1    51.68% |█████████▊         |   0   0   1      0%      0%
  VideoEnhance/0     0.00% |                   |   0   0   0      0%      0%

  PID            NAME   rcs0       bcs0       vcs0       vcs1       vecs0
21664        gem_wsim |█████▍   ||         ||█████████||████▋    ||         |
21662     gem_latency |         ||████████▎||         ||         ||         |
21662     gem_latency |         ||         ||         ||         ||         |

Hopefully the screen shot is self-explanatory. It shows overall GPU per-engine
stats, plus per-client and per-engine busyness.

In this version all review feedback has been incorporated and the context param
query for DCG is back as the last patch. (DCG should only need patches 1-2 & 7).

For the rest I kept the interface as sysfs in hope it would have the advantage
of solving the access control one day. (Setting ownership on sysfs nodes to
follow the DRM client? Still have to investigate this angle.)

This time around I won't be sending the IGT patches since I am building it all
on top of engine queue depths, and on top of the intel-gpu-top rewrite. Both are
unmerged so sending it all just to show this would be a bit much.

Tvrtko Ursulin (7):
  drm/i915: Use seqlock in engine stats
  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
  drm/i915: Allow clients to query own per-engine busyness

 drivers/gpu/drm/i915/i915_drv.h         |  39 +++++++
 drivers/gpu/drm/i915/i915_gem.c         | 192 ++++++++++++++++++++++++++++++--
 drivers/gpu/drm/i915/i915_gem_context.c | 121 +++++++++++++++++++-
 drivers/gpu/drm/i915/i915_gem_context.h |   8 ++
 drivers/gpu/drm/i915/i915_sysfs.c       |  80 +++++++++++++
 drivers/gpu/drm/i915/intel_engine_cs.c  |  50 +++++++--
 drivers/gpu/drm/i915/intel_lrc.c        |  14 ++-
 drivers/gpu/drm/i915/intel_ringbuffer.h |  66 +++++++++--
 include/uapi/drm/i915_drm.h             |  21 ++++
 9 files changed, 553 insertions(+), 38 deletions(-)

-- 
2.14.1



More information about the igt-dev mailing list