All of lore.kernel.org
 help / color / mirror / Atom feed
From: Tvrtko Ursulin <tursulin@ursulin.net>
To: Intel-gfx@lists.freedesktop.org
Subject: [RFC 0/5] Class/instance based execbuf plus more
Date: Mon, 13 Nov 2017 13:09:04 +0000	[thread overview]
Message-ID: <20171113130909.31345-1-tvrtko.ursulin@linux.intel.com> (raw)

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

Now that the engine class concept is in, it is time to re-send the old proposal
of using it for engine selection in execbuf.

Idea is primarily to fix the situation with the current VCS engine selection ABI
by introducing a new, cleaner, method of selecting the VCS engine.

Then there are two new pieces of uAPI proposal, engine capabilities and
concurrent contexts, which for instance enable the VA-API driver to let the i915
balance it's batch buffers dynamically.

This enables better utilization of resources on GT3/GT4 parts where:

 a) a single stream can now use both engines
 b) it opens the door of extending the i915 scheduler with more advanced
    load balancing approaches to support the multiple-streams use cases better.

For instance decoding a single H.264 stream on a GT4 part is now improved from
57 seconds to 40 seconds, with minimal VA-API code base changes:

root@sc:~/ffmpeg# VA_INTEL_CONCURRENT=0 perf stat -a -e i915/vcs0-busy/,i915/vcs1-busy/ ffmpeg -loglevel panic -hwaccel vaapi -hwaccel_output_format vaapi -i ~/bbb_sunflower_1080p_60fps_normal.mp4 -f null -

 Performance counter stats for 'system wide':

    57,568,097,358 ns   i915/vcs0-busy/
                 0 ns   i915/vcs1-busy/

      57.585753514 seconds time elapsed

root@sc:~/ffmpeg# VA_INTEL_CONCURRENT=1 perf stat -a -e i915/vcs0-busy/,i915/vcs1-busy/ ffmpeg -loglevel panic -hwaccel vaapi -hwaccel_output_format vaapi -i ~/bbb_sunflower_1080p_60fps_normal.mp4 -f null -

 Performance counter stats for 'system wide':

    29,152,427,164 ns   i915/vcs0-busy/
    29,115,272,714 ns   i915/vcs1-busy/

      40.733992298 seconds time elapsed

I will be sending the proof-of-concept patches for intel-vaapi-driver
separately.

Tvrtko Ursulin (5):
  drm/i915: Select engines via class and instance in execbuffer2
  drm/i915: Engine capabilities uAPI
  drm/i915: Concurrent context uAPI
  drm/i915: Re-arrange execbuf so context is known before engine
  drm/i915: Per batch buffer VCS balancing

 drivers/gpu/drm/i915/i915_drv.h            |   7 +-
 drivers/gpu/drm/i915/i915_gem.c            |   2 +-
 drivers/gpu/drm/i915/i915_gem_context.c    |  14 +++
 drivers/gpu/drm/i915/i915_gem_context.h    |  20 +++++
 drivers/gpu/drm/i915/i915_gem_execbuffer.c | 134 ++++++++++++++++++++++-------
 drivers/gpu/drm/i915/intel_engine_cs.c     |   3 +
 drivers/gpu/drm/i915/intel_ringbuffer.h    |   2 +
 include/uapi/drm/i915_drm.h                |  34 +++++++-
 8 files changed, 180 insertions(+), 36 deletions(-)

-- 
2.14.1

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

             reply	other threads:[~2017-11-13 13:09 UTC|newest]

Thread overview: 14+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2017-11-13 13:09 Tvrtko Ursulin [this message]
2017-11-13 13:09 ` [RFC 1/5] drm/i915: Select engines via class and instance in execbuffer2 Tvrtko Ursulin
2017-11-13 13:09 ` [RFC 2/5] drm/i915: Engine capabilities uAPI Tvrtko Ursulin
2017-11-13 13:13   ` Chris Wilson
2017-11-13 13:17   ` Chris Wilson
2017-11-13 13:09 ` [RFC 3/5] drm/i915: Concurrent context uAPI Tvrtko Ursulin
2017-11-13 13:19   ` Chris Wilson
2017-11-13 13:23     ` Chris Wilson
2017-11-13 13:28   ` Chris Wilson
2017-11-13 13:09 ` [RFC 4/5] drm/i915: Re-arrange execbuf so context is known before engine Tvrtko Ursulin
2017-11-13 13:09 ` [RFC 5/5] drm/i915: Per batch buffer VCS balancing Tvrtko Ursulin
2017-11-16  0:21   ` Oscar Mateo
2017-11-16  9:57     ` Chris Wilson
2017-11-13 13:13 ` ✗ Fi.CI.BAT: failure for Class/instance based execbuf plus more 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=20171113130909.31345-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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.