Skip to content

Queued/runnable/running engine stats

Tvrtko Ursulin intel-gfx 6 versions – In review

Get series with b4
b4 am [email protected]

Versions newest first · linked by author and title

  1. v6 Latest7 patches 5 repliesIn review
  2. v57 patches 17 repliesSuperseded
  3. v47 patches 2 repliesSuperseded
Earlier versions · 3
VersionPostedPatchesRepliesStatus
v36 patches0 repliesSuperseded
v2 RFC6 patches6 repliesSuperseded
v1 RFC6 patches4 repliesSuperseded

Changes in v6 from the cover letter

* Rebase and update for recently discovered possible hrtimer inaccuracy.

Patches in v6 No applies recorded yet

#Subject and filesSizeRepliesApplied
1/7drm/i915/pmu: Fix enable count array size and bounds checkingdrivers/gpu/drm/i915/i915_pmu.c drivers/gpu/drm/i915/intel_ringbuffer.h+10 -50 replies
2/7drm/i915: Keep a count of requests waiting for a slot on GPUdrivers/gpu/drm/i915/i915_gem.c drivers/gpu/drm/i915/i915_request.c drivers/gpu/drm/i915/intel_engine_cs.c +2 more+21 -20 replies
3/7drm/i915: Keep a count of requests submitted from userspacedrivers/gpu/drm/i915/i915_request.c drivers/gpu/drm/i915/intel_engine_cs.c drivers/gpu/drm/i915/intel_lrc.c +1 more+15 -10 replies
4/7drm/i915/pmu: Add queued counterdrivers/gpu/drm/i915/i915_pmu.c drivers/gpu/drm/i915/intel_ringbuffer.h include/uapi/drm/i915_drm.h+52 -122 replies
4/7drm/i915/pmu: Add queued counterdrivers/gpu/drm/i915/i915_pmu.c drivers/gpu/drm/i915/intel_ringbuffer.h include/uapi/drm/i915_drm.h+53 -120 replies
4/7drm/i915/pmu: Add queued counterdrivers/gpu/drm/i915/i915_pmu.c drivers/gpu/drm/i915/intel_ringbuffer.h include/uapi/drm/i915_drm.h+57 -120 replies
5/7drm/i915/pmu: Add runnable counterdrivers/gpu/drm/i915/i915_pmu.c drivers/gpu/drm/i915/intel_ringbuffer.h include/uapi/drm/i915_drm.h+24 -40 replies
5/7drm/i915/pmu: Add runnable counterdrivers/gpu/drm/i915/i915_pmu.c drivers/gpu/drm/i915/intel_ringbuffer.h include/uapi/drm/i915_drm.h+25 -40 replies
5/7drm/i915/pmu: Add runnable counterdrivers/gpu/drm/i915/i915_pmu.c drivers/gpu/drm/i915/intel_ringbuffer.h include/uapi/drm/i915_drm.h+25 -40 replies
6/7drm/i915/pmu: Add running counterdrivers/gpu/drm/i915/i915_pmu.c drivers/gpu/drm/i915/intel_ringbuffer.h include/uapi/drm/i915_drm.h+23 -30 replies
6/7drm/i915/pmu: Add running counterdrivers/gpu/drm/i915/i915_pmu.c drivers/gpu/drm/i915/intel_ringbuffer.h include/uapi/drm/i915_drm.h+24 -32 replies
6/7drm/i915/pmu: Add running counterdrivers/gpu/drm/i915/i915_pmu.c drivers/gpu/drm/i915/intel_ringbuffer.h include/uapi/drm/i915_drm.h+24 -31 reply
7/7drm/i915: Engine queues querydrivers/gpu/drm/i915/i915_query.c include/uapi/drm/i915_drm.h+72 -00 replies

Reviews trailers per patch

1 of 13 patches has a Reviewed-by or Acked-by.

PatchLionel Landwerlin
1/7
2/7
3/7
4/7
4/7
4/7
5/7
5/7
5/7
6/7
6/7
6/7
7/7R-b

Trailers given in replies are filled; those carried in the patches from earlier versions are outlined with dashes.

Read the v6 thread

Cover letter [PATCH v6 0/7] Queued/runnable/running engine stats

From: Tvrtko Ursulin <[email protected]>

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(-)
Signature · 6 lines
2.17.1

_______________________________________________
Intel-gfx mailing list
[email protected]
https://lists.freedesktop.org/mailman/listinfo/intel-gfx