[Intel-gfx] [RFC 00/10] Virtual queue/engine uAPI prototype

Tvrtko Ursulin tursulin at ursulin.net
Thu Jan 25 13:33:23 UTC 2018


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

The latest idea on how to load-balance VCS submissions in i915.

This time round we have a concept of submission queues implemented as contexts
which share PPGTT.

Userspace is supposed to create a queue with the virtual flag set to one.
Subsequent submissions to this queue will be load-balanced between available VCS
engines by the driver.

Only new class/instance based execbuf uAPI is supported. Explicit VCS engine
selection will be rejected meaning engine instance must be set to zero.

Engine capabilities must be used if a submission depends on an non-uniform
engine feature like HEVC which is only available on VCS0.

This series is just a prototype which illustrates the uAPI proposal. It does not
claim to balance well. In fact, it is known to balance poorly - in some cases
significantly worse than the same approach implemented in userspace. This
potentially stems from the fact it creates a forced dependency when moving
between engines (even when there are no data dependencies between batches) in
order to simulate a single stream of execution per virtual engine.

Series also doesn't implement the virtual engine fully in a way that context
state does not move around with the submissions, ie. it is not preserved.

I will also post gem_wsim and media-bench.pl IGT patches which allows playing
with this easily.

Chris Wilson (2):
  move-timeline-to-ctx
  drm/i915: Extend CREATE_CONTEXT to allow inheritance ala clone()

Tvrtko Ursulin (8):
  drm/i915: Select engines via class and instance in execbuffer2
  drm/i915: Engine capabilities uAPI
  drm/i915: Re-arrange execbuf so context is known before engine
  drm/i915: Refactor eb_select_engine to take eb
  drm/i915: Track latest request per engine class
  drm/i915: Allow creating virtual contexts
  drm/i915: Trivial virtual engine implementation
  drm/i915: Naive engine busyness based load balancing

 drivers/gpu/drm/i915/i915_drv.h                   |  11 +-
 drivers/gpu/drm/i915/i915_gem.c                   |   9 +-
 drivers/gpu/drm/i915/i915_gem_context.c           |  91 +++++++--
 drivers/gpu/drm/i915/i915_gem_context.h           |  23 +++
 drivers/gpu/drm/i915/i915_gem_execbuffer.c        | 223 ++++++++++++++++----
 drivers/gpu/drm/i915/i915_gem_gtt.c               |   7 +-
 drivers/gpu/drm/i915/i915_gem_gtt.h               |   2 -
 drivers/gpu/drm/i915/i915_gem_request.c           |  15 +-
 drivers/gpu/drm/i915/i915_gem_request.h           |   2 +
 drivers/gpu/drm/i915/i915_gem_timeline.c          |  66 +++++-
 drivers/gpu/drm/i915/i915_gem_timeline.h          |   6 +
 drivers/gpu/drm/i915/intel_engine_cs.c            |  41 +++-
 drivers/gpu/drm/i915/intel_lrc.c                  |   2 +-
 drivers/gpu/drm/i915/intel_ringbuffer.c           |   9 +-
 drivers/gpu/drm/i915/intel_ringbuffer.h           |   9 +-
 drivers/gpu/drm/i915/selftests/huge_pages.c       |   1 -
 drivers/gpu/drm/i915/selftests/i915_gem_context.c | 236 +++++++++++++++++-----
 drivers/gpu/drm/i915/selftests/i915_gem_gtt.c     |   1 -
 drivers/gpu/drm/i915/selftests/mock_context.c     |   3 +-
 drivers/gpu/drm/i915/selftests/mock_engine.c      |   3 +-
 drivers/gpu/drm/i915/selftests/mock_gem_device.c  |   4 +-
 drivers/gpu/drm/i915/selftests/mock_gtt.c         |   1 -
 include/uapi/drm/i915_drm.h                       |  38 +++-
 23 files changed, 660 insertions(+), 143 deletions(-)

-- 
2.14.1



More information about the Intel-gfx mailing list