public inbox for intel-gfx@lists.freedesktop.org
 help / color / mirror / Atom feed
From: Tvrtko Ursulin <tursulin@ursulin.net>
To: Intel-gfx@lists.freedesktop.org
Subject: [RFC 00/10] Virtual queue/engine uAPI prototype
Date: Thu, 25 Jan 2018 13:33:23 +0000	[thread overview]
Message-ID: <20180125133333.13425-1-tvrtko.ursulin@linux.intel.com> (raw)

From: Tvrtko Ursulin <tvrtko.ursulin@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

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

             reply	other threads:[~2018-01-25 13:33 UTC|newest]

Thread overview: 16+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2018-01-25 13:33 Tvrtko Ursulin [this message]
2018-01-25 13:33 ` [RFC 01/10] move-timeline-to-ctx Tvrtko Ursulin
2018-01-25 13:33 ` [RFC 02/10] drm/i915: Extend CREATE_CONTEXT to allow inheritance ala clone() Tvrtko Ursulin
2018-01-25 13:33 ` [RFC 03/10] drm/i915: Select engines via class and instance in execbuffer2 Tvrtko Ursulin
2018-01-25 13:33 ` [RFC 04/10] drm/i915: Engine capabilities uAPI Tvrtko Ursulin
2018-01-25 13:33 ` [RFC 05/10] drm/i915: Re-arrange execbuf so context is known before engine Tvrtko Ursulin
2018-01-25 13:33 ` [RFC 06/10] drm/i915: Refactor eb_select_engine to take eb Tvrtko Ursulin
2018-01-25 13:33 ` [RFC 07/10] drm/i915: Track latest request per engine class Tvrtko Ursulin
2018-01-25 13:33 ` [RFC 08/10] drm/i915: Allow creating virtual contexts Tvrtko Ursulin
2018-01-25 13:33 ` [RFC 09/10] drm/i915: Trivial virtual engine implementation Tvrtko Ursulin
2018-01-25 13:57   ` Chris Wilson
2018-01-25 14:26     ` Tvrtko Ursulin
2018-01-25 14:32       ` Chris Wilson
2018-01-25 14:36         ` Tvrtko Ursulin
2018-01-25 13:33 ` [RFC 10/10] drm/i915: Naive engine busyness based load balancing Tvrtko Ursulin
2018-01-25 14:12 ` ✗ Fi.CI.BAT: failure for Virtual queue/engine uAPI prototype Patchwork

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20180125133333.13425-1-tvrtko.ursulin@linux.intel.com \
    --to=tursulin@ursulin.net \
    --cc=Intel-gfx@lists.freedesktop.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox