Intel-GFX Archive on lore.kernel.org
 help / color / mirror / Atom feed
* [RFC v5 00/10] Per-context and per-client engine busyness
@ 2018-05-22 12:30 Tvrtko Ursulin
  2018-05-22 12:30 ` [RFC 01/10] drm/i915: Store engine backpointer in the intel_context Tvrtko Ursulin
                   ` (13 more replies)
  0 siblings, 14 replies; 20+ messages in thread
From: Tvrtko Ursulin @ 2018-05-22 12:30 UTC (permalink / raw)
  To: Intel-gfx

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

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

end of thread, other threads:[~2018-05-22 18:15 UTC | newest]

Thread overview: 20+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2018-05-22 12:30 [RFC v5 00/10] Per-context and per-client engine busyness Tvrtko Ursulin
2018-05-22 12:30 ` [RFC 01/10] drm/i915: Store engine backpointer in the intel_context Tvrtko Ursulin
2018-05-22 12:30 ` [RFC 02/10] drm/i915: Include i915_scheduler.h from i915_gem_context.h Tvrtko Ursulin
2018-05-22 12:44   ` Chris Wilson
2018-05-22 12:52   ` Mika Kuoppala
2018-05-22 12:30 ` [RFC 03/10] drm/i915: Forward declare struct intel_context Tvrtko Ursulin
2018-05-22 12:44   ` Chris Wilson
2018-05-22 12:30 ` [RFC 04/10] drm/i915: Move intel_engine_context_in/out into intel_lrc.c Tvrtko Ursulin
2018-05-22 12:46   ` Chris Wilson
2018-05-22 13:02     ` Tvrtko Ursulin
2018-05-22 12:30 ` [RFC 05/10] drm/i915: Track per-context engine busyness Tvrtko Ursulin
2018-05-22 12:30 ` [RFC 06/10] drm/i915: Expose list of clients in sysfs Tvrtko Ursulin
2018-05-22 12:30 ` [RFC 07/10] drm/i915: Update client name on context create Tvrtko Ursulin
2018-05-22 12:30 ` [RFC 08/10] drm/i915: Expose per-engine client busyness Tvrtko Ursulin
2018-05-22 12:30 ` [RFC 09/10] drm/i915: Add sysfs toggle to enable per-client engine stats Tvrtko Ursulin
2018-05-22 12:30 ` [RFC 10/10] drm/i915: Allow clients to query own per-engine busyness Tvrtko Ursulin
2018-05-22 12:54 ` ✗ Fi.CI.CHECKPATCH: warning for Per-context and per-client engine busyness (rev6) Patchwork
2018-05-22 12:58 ` ✗ Fi.CI.SPARSE: " Patchwork
2018-05-22 13:10 ` ✓ Fi.CI.BAT: success " Patchwork
2018-05-22 18:15 ` ✓ 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