All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH v6 0/7] Queued/runnable/running engine stats
@ 2018-06-06 12:48 Tvrtko Ursulin
  2018-06-06 12:48 ` [PATCH 1/7] drm/i915/pmu: Fix enable count array size and bounds checking Tvrtko Ursulin
                   ` (12 more replies)
  0 siblings, 13 replies; 25+ messages in thread
From: Tvrtko Ursulin @ 2018-06-06 12:48 UTC (permalink / raw)
  To: Intel-gfx

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

Per-engine queue depths are an interesting metric for analyzing the system load
and also for users who wish to use it to load balance their submissions based
on it.

In this version I have split the metrics into three separate counters:

1. QUEUED - From execbuf time to request being runnable - runnable meaning until
            dependencies have been resolved and fences signaled.
2. RUNNABLE - From runnable to running on the GPU.
3. RUNNING - Running on the GPU.

When inspected with perf stat the output looks roughly like this:

#           time             counts unit events
   201.160490145               0.01      i915/rcs0-queued/
   201.160490145              19.13      i915/rcs0-runnable/
   201.160490145               2.39      i915/rcs0-running/

The reported numbers are average queue depths for the last query period.

v2:
 * Review feedback (see patch changelogs).
 * Renamed the counters and re-ordered some patches.

v3:
 * Review feedback and rebase.

v4:
 * Addition of last patch in the series, which supports a customer requirement
   to expose instantaneous queue values via the i915 query API.

v5:
 * Fixed accounting under wedging.
 * Error code ABI tweak.

 v6:
 * Rebase and update for recently discovered possible hrtimer inaccuracy.

Tvrtko Ursulin (7):
  drm/i915/pmu: Fix enable count array size and bounds checking
  drm/i915: Keep a count of requests waiting for a slot on GPU
  drm/i915: Keep a count of requests submitted from userspace
  drm/i915/pmu: Add queued counter
  drm/i915/pmu: Add runnable counter
  drm/i915/pmu: Add running counter
  drm/i915: Engine queues query

 drivers/gpu/drm/i915/i915_gem.c         |  1 +
 drivers/gpu/drm/i915/i915_pmu.c         | 96 +++++++++++++++++++++----
 drivers/gpu/drm/i915/i915_query.c       | 43 +++++++++++
 drivers/gpu/drm/i915/i915_request.c     | 10 +++
 drivers/gpu/drm/i915/intel_engine_cs.c  |  6 +-
 drivers/gpu/drm/i915/intel_lrc.c        |  3 +
 drivers/gpu/drm/i915/intel_ringbuffer.h | 21 +++++-
 include/uapi/drm/i915_drm.h             | 48 ++++++++++++-
 8 files changed, 209 insertions(+), 19 deletions(-)

-- 
2.17.1

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

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

end of thread, other threads:[~2018-06-07 17:55 UTC | newest]

Thread overview: 25+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2018-06-06 12:48 [PATCH v6 0/7] Queued/runnable/running engine stats Tvrtko Ursulin
2018-06-06 12:48 ` [PATCH 1/7] drm/i915/pmu: Fix enable count array size and bounds checking Tvrtko Ursulin
2018-06-06 12:48 ` [PATCH 2/7] drm/i915: Keep a count of requests waiting for a slot on GPU Tvrtko Ursulin
2018-06-06 12:48 ` [PATCH 3/7] drm/i915: Keep a count of requests submitted from userspace Tvrtko Ursulin
2018-06-06 12:48 ` [PATCH 4/7] drm/i915/pmu: Add queued counter Tvrtko Ursulin
2018-06-06 13:16   ` Chris Wilson
2018-06-06 13:24     ` Tvrtko Ursulin
2018-06-06 14:39   ` Tvrtko Ursulin
2018-06-07 13:24     ` Tvrtko Ursulin
2018-06-06 12:48 ` [PATCH 5/7] drm/i915/pmu: Add runnable counter Tvrtko Ursulin
2018-06-06 14:39   ` Tvrtko Ursulin
2018-06-07 13:24     ` Tvrtko Ursulin
2018-06-06 12:48 ` [PATCH 6/7] drm/i915/pmu: Add running counter Tvrtko Ursulin
2018-06-06 14:40   ` Tvrtko Ursulin
2018-06-06 15:23     ` Chris Wilson
2018-06-06 15:52       ` Tvrtko Ursulin
2018-06-07 13:25     ` Tvrtko Ursulin
2018-06-07 14:45       ` Chris Wilson
2018-06-06 12:48 ` [PATCH 7/7] drm/i915: Engine queues query Tvrtko Ursulin
2018-06-06 13:31 ` ✓ Fi.CI.BAT: success for Queued/runnable/running engine stats (rev8) Patchwork
2018-06-06 15:17 ` ✓ Fi.CI.BAT: success for Queued/runnable/running engine stats (rev11) Patchwork
2018-06-06 16:06 ` ✗ Fi.CI.IGT: failure for Queued/runnable/running engine stats (rev8) Patchwork
2018-06-06 17:26 ` ✓ Fi.CI.IGT: success for Queued/runnable/running engine stats (rev11) Patchwork
2018-06-07 13:57 ` ✓ Fi.CI.BAT: success for Queued/runnable/running engine stats (rev14) Patchwork
2018-06-07 17:55 ` ✓ Fi.CI.IGT: " 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.