public inbox for intel-gfx@lists.freedesktop.org
 help / color / mirror / Atom feed
* [RFC 0/6] Per context and per client GPU busyness tracking
@ 2019-05-10 13:22 Tvrtko Ursulin
  2019-05-10 13:22 ` [RFC 1/6] drm/i915: Move intel_engine_context_in/out into intel_lrc.c Tvrtko Ursulin
                   ` (8 more replies)
  0 siblings, 9 replies; 14+ messages in thread
From: Tvrtko Ursulin @ 2019-05-10 13:22 UTC (permalink / raw)
  To: Intel-gfx

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

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@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/intel-gfx

^ permalink raw reply	[flat|nested] 14+ messages in thread

end of thread, other threads:[~2019-05-10 16:48 UTC | newest]

Thread overview: 14+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2019-05-10 13:22 [RFC 0/6] Per context and per client GPU busyness tracking Tvrtko Ursulin
2019-05-10 13:22 ` [RFC 1/6] drm/i915: Move intel_engine_context_in/out into intel_lrc.c Tvrtko Ursulin
2019-05-10 13:22 ` [RFC 2/6] drm/i915: Track per-context engine busyness Tvrtko Ursulin
2019-05-10 14:22   ` Chris Wilson
2019-05-10 13:22 ` [RFC 3/6] drm/i915: Expose list of clients in sysfs Tvrtko Ursulin
2019-05-10 14:12   ` Chris Wilson
2019-05-10 13:22 ` [RFC 4/6] drm/i915: Update client name on context create Tvrtko Ursulin
2019-05-10 13:22 ` [RFC 5/6] drm/i915: Expose per-engine client busyness Tvrtko Ursulin
2019-05-10 13:57   ` Chris Wilson
2019-05-10 14:02     ` Tvrtko Ursulin
2019-05-10 13:22 ` [RFC 6/6] drm/i915: Add sysfs toggle to enable per-client engine stats Tvrtko Ursulin
2019-05-10 14:13 ` ✗ Fi.CI.CHECKPATCH: warning for Per context and per client GPU busyness tracking Patchwork
2019-05-10 15:06 ` ✓ Fi.CI.BAT: success " Patchwork
2019-05-10 16:48 ` ✓ Fi.CI.IGT: " Patchwork

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox