All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH v2 0/6] Per-context and per-client engine busyness
@ 2018-01-19 13:45 Tvrtko Ursulin
  2018-01-19 13:45 ` [PATCH 1/6] drm/i915: Track per-context " Tvrtko Ursulin
                   ` (7 more replies)
  0 siblings, 8 replies; 18+ messages in thread
From: Tvrtko Ursulin @ 2018-01-19 13:45 UTC (permalink / raw)
  To: Intel-gfx

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

I have sent this as part of a larger series back in October '17.

First part of it is implementing a customer requirement to be able to query
engine utilization on their own contexts. This is done in patch 2, which falls
under the standard open source userspace requirements etc.

The rest of the series implements per-client engine utilization stats, something
which I think is quite interesting and missing from our stack at the moment. And
in fact, in the latest other OS update I have noticed they actually can expose
this statistics.

I have prototyped a simple top-like utility which can show you the overall
engine stats (data coming from recently merged PMU), and then using the sysfs
API from this series a sorted breakdown of currently running clients. Output of
that looks like this:

  rcs0:  88.89% busy (  0.27 qd),   0.00% wait,   0.00% sema
  bcs0:  27.50% busy (  0.00 qd),   0.00% wait,   0.00% sema
  vcs0:  86.75% busy (  0.00 qd),   0.00% wait,   0.00% sema
 vecs0:   0.00% busy (  0.00 qd),   0.00% wait,   0.00% sema

         gem_wsim[ 21806]:  rcs0:  43.18%  bcs0:  27.52%  vcs0:  86.80%  vecs0:   0.00%
             Xorg[ 21451]:  rcs0:  33.60%  bcs0:   0.00%  vcs0:   0.00%  vecs0:   0.00%
  chromium-browse[ 21670]:  rcs0:  12.16%  bcs0:   0.00%  vcs0:   0.00%  vecs0:   0.00%
             Xorg[ 21451]:  rcs0:   0.00%  bcs0:   0.00%  vcs0:   0.00%  vecs0:   0.00%
            xfwm4[ 21506]:  rcs0:   0.00%  bcs0:   0.00%  vcs0:   0.00%  vecs0:   0.00%

Patch series needs some more work, for instance the summation of busyness per-
client is not the most efficient, standard debugging and so, but seems to work
reasonably well so far.

What is also possible to do on top of this series, is to extend our current PMU
interface to allow per-task profiling via perf tool as well. I have started
implementing that at one point and could go back to it.

Tvrtko Ursulin (6):
  drm/i915: Track per-context engine busyness
  drm/i915: Allow clients to query own per-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/i915_drv.h         |  24 +++++
 drivers/gpu/drm/i915/i915_gem.c         | 178 ++++++++++++++++++++++++++++++--
 drivers/gpu/drm/i915/i915_gem_context.c |  56 +++++++++-
 drivers/gpu/drm/i915/i915_gem_context.h |   6 ++
 drivers/gpu/drm/i915/i915_sysfs.c       |  80 ++++++++++++++
 drivers/gpu/drm/i915/intel_engine_cs.c  |  32 ++++++
 drivers/gpu/drm/i915/intel_lrc.c        |  14 ++-
 drivers/gpu/drm/i915/intel_ringbuffer.h |  50 +++++++--
 include/uapi/drm/i915_drm.h             |  11 +-
 9 files changed, 427 insertions(+), 24 deletions(-)

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

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

end of thread, other threads:[~2018-01-22 17:11 UTC | newest]

Thread overview: 18+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2018-01-19 13:45 [PATCH v2 0/6] Per-context and per-client engine busyness Tvrtko Ursulin
2018-01-19 13:45 ` [PATCH 1/6] drm/i915: Track per-context " Tvrtko Ursulin
2018-01-19 16:26   ` [PATCH v5 " Tvrtko Ursulin
2018-01-19 21:02     ` Chris Wilson
2018-01-19 13:45 ` [PATCH 2/6] drm/i915: Allow clients to query own per-engine busyness Tvrtko Ursulin
2018-01-19 21:08   ` Chris Wilson
2018-01-22  9:53     ` Tvrtko Ursulin
2018-01-22 10:00       ` Chris Wilson
2018-01-22 11:45         ` Tvrtko Ursulin
2018-01-22 12:32           ` Chris Wilson
2018-01-22 17:11             ` Tvrtko Ursulin
2018-01-19 13:45 ` [PATCH 3/6] drm/i915: Expose list of clients in sysfs Tvrtko Ursulin
2018-01-19 13:45 ` [PATCH 4/6] drm/i915: Update client name on context create Tvrtko Ursulin
2018-01-19 13:45 ` [PATCH 5/6] drm/i915: Expose per-engine client busyness Tvrtko Ursulin
2018-01-22  9:59   ` Tvrtko Ursulin
2018-01-19 13:45 ` [PATCH 6/6] drm/i915: Add sysfs toggle to enable per-client engine stats Tvrtko Ursulin
2018-01-19 15:31 ` ✗ Fi.CI.BAT: failure for Per-context and per-client engine busyness (rev2) Patchwork
2018-01-19 16:54 ` ✗ Fi.CI.BAT: failure for Per-context and per-client engine busyness (rev3) Patchwork

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.