mbox series

[RFC,0/3] drm/i915: serialized performance queries

Message ID 20181008151822.10519-1-lionel.g.landwerlin@intel.com (mailing list archive)
Headers show
Series drm/i915: serialized performance queries | expand

Message

Lionel Landwerlin Oct. 8, 2018, 3:18 p.m. UTC
Hi all,

This is a early stage series on which I'm looking for feedback.

Some background :

Performance queries (sampling performance counters through
MI_REPORT_PERF_COUNT instruction) commands requires the hardware to be
programmed with the desired configuration to allow particular
performance data to be recorded. Up to this series, an application
querying performance data would have to close/reopen the i915/perf
stream each time it wanted to gather different type of performance
data.

This series introduce a new mechanism through the execbuf parameters
to specify what configuration should be used for the set of commands
given into the execbuf's batchbuffer.

Motivation :

Giving the configuration needed to gather performance data at execbuf
time together with holding preemption on the batchs of the same
application allows data to be gathered using just MI_REPORT_PERF_COUNT
instructions and also to go through all many configuration without
slowing down the application. The application can now serialize many
queries of different types and doesn't have to wait for completion of
a previous query to submit a new one with a different configuration.



These patches are in no way final, in particular the execbuf uapi
changes is probably unworkable in production (it was just a quick way
to prove things are working). I heard discussions about execbuf3, this
could probably be tied into that.

Looking forward to your comments.

Thanks,

Lionel Landwerlin (3):
  drm/i915/perf: allow holding preemption on filtered ctx
  drm/i915/perf: allow for CS OA configs to be created lazily
  drm/i915: add a new perf configuration execbuf parameter

 drivers/gpu/drm/i915/i915_drv.c            |   4 +
 drivers/gpu/drm/i915/i915_drv.h            |  22 +-
 drivers/gpu/drm/i915/i915_gem_context.c    |   1 +
 drivers/gpu/drm/i915/i915_gem_context.h    |   3 +
 drivers/gpu/drm/i915/i915_gem_execbuffer.c |  60 +++++-
 drivers/gpu/drm/i915/i915_perf.c           | 227 ++++++++++++++++++---
 drivers/gpu/drm/i915/i915_request.c        |   4 +
 drivers/gpu/drm/i915/i915_request.h        |   2 +
 drivers/gpu/drm/i915/intel_gpu_commands.h  |   1 +
 drivers/gpu/drm/i915/intel_lrc.c           |  15 +-
 drivers/gpu/drm/i915/intel_ringbuffer.c    |  11 +-
 include/uapi/drm/i915_drm.h                |  20 +-
 12 files changed, 327 insertions(+), 43 deletions(-)

--
2.19.1