Skip to content

Framework to collect command stream gpu metrics using i915 perf

[email protected] intel-gfx 1 version In review

Get series with b4
b4 am [email protected]

Versions newest first

  1. v1 Latest15 patches 6 repliesIn review

Patches in v1 No applies recorded yet

#Subject and filesSizeRepliesApplied
1/15drm/i915: Add ctx getparam ioctl parameter to retrieve ctx unique iddrivers/gpu/drm/i915/i915_gem_context.c include/uapi/drm/i915_drm.h+4 -04 replies
2/15drm/i915: Expose OA sample source to userspacedrivers/gpu/drm/i915/i915_perf.c include/uapi/drm/i915_drm.h+63 -80 replies
3/15drm/i915: Framework for capturing command stream based OA reportsdrivers/gpu/drm/i915/i915_drv.h drivers/gpu/drm/i915/i915_gem_execbuffer.c drivers/gpu/drm/i915/i915_perf.c +2 more+804 -1342 replies
4/15drm/i915: flush periodic samples, in case of no pending CS sample requestsdrivers/gpu/drm/i915/i915_drv.h drivers/gpu/drm/i915/i915_perf.c+140 -470 replies
5/15drm/i915: Handle the overflow condition for command stream bufdrivers/gpu/drm/i915/i915_drv.h drivers/gpu/drm/i915/i915_perf.c+62 -150 replies
6/15drm/i915: Populate ctx ID for periodic OA reportsdrivers/gpu/drm/i915/i915_drv.h drivers/gpu/drm/i915/i915_perf.c+52 -30 replies
7/15drm/i915: Add support for having pid output with OA reportdrivers/gpu/drm/i915/i915_drv.h drivers/gpu/drm/i915/i915_perf.c include/uapi/drm/i915_drm.h+56 -10 replies
8/15drm/i915: Add support for emitting execbuffer tags through OA counter reportsdrivers/gpu/drm/i915/i915_drv.h drivers/gpu/drm/i915/i915_gem_execbuffer.c drivers/gpu/drm/i915/i915_perf.c +2 more+55 -110 replies
9/15drm/i915: Extend i915 perf framework for collecting timestamps on all gpu enginesdrivers/gpu/drm/i915/i915_drv.h drivers/gpu/drm/i915/i915_perf.c drivers/gpu/drm/i915/i915_reg.h +1 more+465 -2240 replies
10/15drm/i915: Extract raw GPU timestamps from OA reports to forward in perf samplesdrivers/gpu/drm/i915/i915_drv.h drivers/gpu/drm/i915/i915_perf.c drivers/gpu/drm/i915/i915_reg.h+40 -110 replies
11/15drm/i915: Support opening multiple concurrent perf streamsdrivers/gpu/drm/i915/i915_drv.h drivers/gpu/drm/i915/i915_perf.c+39 -320 replies
12/15time: Expose current clocksource in use by timekeeping frameworkinclude/linux/timekeeping.h kernel/time/timekeeping.c+17 -00 replies
13/15time: export clocks_calc_mult_shiftkernel/time/clocksource.c+1 -00 replies
14/15drm/i915: Mechanism to forward clock monotonic raw time in perf samplesdrivers/gpu/drm/i915/i915_dma.c drivers/gpu/drm/i915/i915_drv.h drivers/gpu/drm/i915/i915_perf.c +1 more+284 -240 replies
15/15drm/i915: Support for capturing MMIO register valuesdrivers/gpu/drm/i915/i915_drv.h drivers/gpu/drm/i915/i915_perf.c include/uapi/drm/i915_drm.h+188 -30 replies

Reviews trailers per patch

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

PatchDeepak S
1/15R-b
2/15
3/15
4/15
5/15
6/15
7/15
8/15
9/15
10/15
11/15
12/15
13/15
14/15
15/15

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

Read the v1 thread

Cover letter [PATCH 00/15] Framework to collect command stream gpu metrics using i915 perf

From: Sourab Gupta <[email protected]>

This series adds framework for collection of gpu performance metrics associated with the command stream of a particular engine. These metrics include OA reports, timestamps, mmio metrics, etc. These metrics are are collected around batchbuffer boundaries.

This work utilizes the underlying infrastructure introduced in Robert Bragg's patches for collecting periodic OA counter snapshots (based on Haswell):
https://lists.freedesktop.org/archives/intel-gfx/2016-April/093206.html

This patch set is based on Gen8+ version of Robert's patches which can be found
here: https://github.com/rib/linux/tree/wip/rib/oa-2016-05-05-nightly
These are not yet individually floated in the mailing list, which I hope doesn't lead to any significant loss of clarity in order to review the work proposed in this patch series.

Compared to last series I floated earlier,
(https://lists.freedesktop.org/archives/intel-gfx/2016-April/093645.html),
this series incorporates the following changes/fixes, besides rebasing on Robert's latest work (on a later nightly):

* Based on Chris's suggestion, I have tried experimenting with using the cross timestamp framework for the purpose of retrieving tightly coupled device/system timestamps. In our case, this framework enables us to have correlated pairs of gpu+system time which can be used over a period of time to correct the frequency of timestamp clock, and thus enable to accurately send system time (_MONO_RAW) as requested to the userspace. The results are generally observed to quite better with the use of cross timestamps and the frequency delta gradually tapers down to 0 with increasing correction periods. The use of cross timestamp framework though requires us to have clockcounter/timecounter abstraction for the timestamp clocksource, and further requires few changes in the kernel timekeeping/clocksource code. I am looking for feedback on the use of this framework and the changes involved.

These patches can be found for viewing at
https://github.com/sourabgu/linux/tree/oa-2016-05-05

Sourab Gupta (15):
drm/i915: Add ctx getparam ioctl parameter to retrieve ctx unique id drm/i915: Expose OA sample source to userspace
drm/i915: Framework for capturing command stream based OA reports drm/i915: flush periodic samples, in case of no pending CS sample
requests
drm/i915: Handle the overflow condition for command stream buf drm/i915: Populate ctx ID for periodic OA reports drm/i915: Add support for having pid output with OA report drm/i915: Add support for emitting execbuffer tags through OA counter
reports
drm/i915: Extend i915 perf framework for collecting timestamps on all
gpu engines
drm/i915: Extract raw GPU timestamps from OA reports to forward in
perf samples
drm/i915: Support opening multiple concurrent perf streams
time: Expose current clocksource in use by timekeeping framework
time: export clocks_calc_mult_shift
drm/i915: Mechanism to forward clock monotonic raw time in perf
samples
drm/i915: Support for capturing MMIO register values

 drivers/gpu/drm/i915/i915_dma.c            |    2 +
 drivers/gpu/drm/i915/i915_drv.h            |  117 +-
 drivers/gpu/drm/i915/i915_gem_context.c    |    3 +
 drivers/gpu/drm/i915/i915_gem_execbuffer.c |    5 +
 drivers/gpu/drm/i915/i915_perf.c           | 1925 +++++++++++++++++++++++++---
 drivers/gpu/drm/i915/i915_reg.h            |    6 +
 drivers/gpu/drm/i915/intel_lrc.c           |    4 +
 include/linux/timekeeping.h                |    5 +
 include/uapi/drm/i915_drm.h                |   79 ++
 kernel/time/clocksource.c                  |    1 +
 kernel/time/timekeeping.c                  |   12 +
 11 files changed, 1958 insertions(+), 201 deletions(-)
Signature · 6 lines
1.9.1

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