[RFC v5 00/10] Per-context and per-client engine busyness

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

 



From: Tvrtko Ursulin <tvrtko.ursulin@xxxxxxxxx>

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 we have a larger rebase on top of the recent code base changes,
some of which made these patches cleaner.

Series now starts with four uninteresting patches, while patches 5 & 10 are what
is asked for by the customer.

Patches 6-9 are the sysfs interface to per-client busyness which enables the
above top like display. I am still sticking with sysfs since theoretically it
could enable easy access control if so would be wanted one day. As discussed
in the past something like this is not possible to expose via PMU.

I think in the future, as compute workloads become more prominent, having the
ability to look at process GPU usage, along the CPU, will become more
interesting.

Final note is that in any case patch 10 is blocked by the lack of open source
userspace.

Tvrtko Ursulin (10):
  drm/i915: Store engine backpointer in the intel_context
  drm/i915: Include i915_scheduler.h from i915_gem_context.h
  drm/i915: Forward declare struct intel_context
  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
  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         | 191 +++++++++++++++++++++++-
 drivers/gpu/drm/i915/i915_gem_context.c | 118 ++++++++++++++-
 drivers/gpu/drm/i915/i915_gem_context.h |  22 +++
 drivers/gpu/drm/i915/i915_sysfs.c       |  80 ++++++++++
 drivers/gpu/drm/i915/intel_engine_cs.c  |  27 ++++
 drivers/gpu/drm/i915/intel_lrc.c        | 107 ++++++++++++-
 drivers/gpu/drm/i915/intel_ringbuffer.h |  55 -------
 include/uapi/drm/i915_drm.h             |  21 +++
 9 files changed, 586 insertions(+), 74 deletions(-)

-- 
2.17.0

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




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

  Powered by Linux