All of lore.kernel.org
 help / color / mirror / Atom feed
From: Xiaolin Zhang <xiaolin.zhang@intel.com>
To: intel-gvt-dev@lists.freedesktop.org, intel-gfx@lists.freedesktop.org
Cc: zhenyu.z.wang@intel.com, hang.yuan@intel.com, zhiyuan.lv@intel.com
Subject: [PATCH v10 0/9] i915 vgpu PV to improve vgpu performance
Date: Tue, 17 Sep 2019 13:48:11 +0800	[thread overview]
Message-ID: <1568699301-2799-1-git-send-email-xiaolin.zhang@intel.com> (raw)

To improve vgpu performance, it could implement some PV optimization
such as to reduce the mmio access trap numbers or eliminate certain piece
of HW emulation within guest driver to reduce vm exit/vm enter cost.

the solutions in this patch set are implemented two PV optimizations based
on the shared memory region between guest and GVTg for data communication.
The shared memory region is allocated by guest driver and this
region's memory guest physical address will be passed to GVTg through
PVINFO register and later GVTg can access this region directly without
trap cost to achieve data exchange purpose between guest and GVTg.

in this patch set, 2 kind of PV optimization implemented controlled by
pv_caps PVINO register with different pv bit.
1. workload PV submission (context submission): reduce 4 traps to 1 trap
and eliminated execlists HW behaviour emulation.
2. ppgtt PV update: eliminate the cost of ppgtt write protection.

based on the experiment, for small workloads, specifally, glxgears with
vblank_mode off, the average performance gain on single vgpu is 30~50%.
for large workload such as media and 3D, the average performance gain
is about 4%. 

based on the PV mechanism, it could achive more vgpu feature optimization
such as globle GTT update, display plane and water mark update.

v0: RFC patch set
v1: addressed RFC review comments
v2: addressed v1 review comments, added pv callbacks for pv operations
v3:
1. addressed v2 review comments, removed pv callbacks code duplication in
v2 and unified pv calls under g2v notification register. different g2v pv
notifications defined.
2. dropped pv master irq feature due to hard conflict with recnet i915
change and take time to rework.
v4:
1. addressed v3 review comments.
2. extended workload PV submission by skip execlists HW behaviour emulation
and context switch interrupt injection.  
v5:
1. addressed v4 review comments from Chris for pv submission.
2. per-engine communication between PV guest and host.
v6:
1. addressed v5 review comments from Chris for pv submission.
2. addressed v5 review comments from Zhenyu for PV version support.
v7:
1. addessed v6 review comments from Chris starting to use pv cmd buffer
communication between pv guest and GVT.
v8: addressed v7 review comments from Chris to refine pv submssion code.
v9: refined PV user-facing message and to free PV shared memory
in i915_destroy_vgpu.
v10: rebased to 5.3.0-rc8 and conducted the IGT BAT test and i915 live test
with PV feature. No regression introduced by PV features. for IGT BAT test
(fast-feedback.testlist), there are 225 cases in total (162 pass, 12 fail,
42 skip) for both vGPU with/without PV features. for i915 live test, PV
features do not bring regression as well. there is a number of cases failed
for vGPU live test which include intel_workarounds_live_selftests,
intel_hangcheck_live_selftests, igt_vm_isolation,
i915_gem_object_blt_live_selftests, preempt, live_virtual_* and required
further analysis, not contributed by the PV patches.

Xiaolin Zhang (9):
  drm/i915: introduced vgpu pv capability
  drm/i915: vgpu shared memory setup for pv optimization
  drm/i915: vgpu pv command buffer support
  drm/i915: vgpu ppgtt update pv optimization
  drm/i915: vgpu context submission pv optimization
  drm/i915/gvt: GVTg handle pv_caps PVINFO register
  drm/i915/gvt: GVTg handle shared_page setup
  drm/i915/gvt: GVTg support ppgtt pv optimization
  drm/i915/gvt: GVTg support context submission pv optimization

 drivers/gpu/drm/i915/Makefile              |   2 +-
 drivers/gpu/drm/i915/gt/intel_lrc.c        |  12 +-
 drivers/gpu/drm/i915/gvt/execlist.c        |   6 +
 drivers/gpu/drm/i915/gvt/gtt.c             | 298 ++++++++++++++++++++
 drivers/gpu/drm/i915/gvt/gtt.h             |  11 +
 drivers/gpu/drm/i915/gvt/gvt.h             |  12 +-
 drivers/gpu/drm/i915/gvt/handlers.c        | 181 +++++++++++-
 drivers/gpu/drm/i915/gvt/vgpu.c            |  50 ++++
 drivers/gpu/drm/i915/i915_debugfs.c        |   2 +
 drivers/gpu/drm/i915/i915_drv.c            |   2 +
 drivers/gpu/drm/i915/i915_drv.h            |   6 +-
 drivers/gpu/drm/i915/i915_gem.c            |   3 +-
 drivers/gpu/drm/i915/i915_gem_gtt.c        |  10 +-
 drivers/gpu/drm/i915/i915_gem_gtt.h        |   8 +
 drivers/gpu/drm/i915/i915_pvinfo.h         |   9 +-
 drivers/gpu/drm/i915/i915_vgpu.c           | 426 ++++++++++++++++++++++++++++-
 drivers/gpu/drm/i915/i915_vgpu.h           | 133 +++++++++
 drivers/gpu/drm/i915/intel_pv_submission.c | 300 ++++++++++++++++++++
 18 files changed, 1455 insertions(+), 16 deletions(-)
 create mode 100644 drivers/gpu/drm/i915/intel_pv_submission.c

-- 
1.8.3.1

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

             reply	other threads:[~2019-09-17  5:48 UTC|newest]

Thread overview: 16+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2019-09-17  5:48 Xiaolin Zhang [this message]
2019-09-17  5:48 ` [PATCH v10 1/9] drm/i915: introduced vgpu pv capability Xiaolin Zhang
2019-09-17  5:48 ` [PATCH v10 2/9] drm/i915: vgpu shared memory setup for pv optimization Xiaolin Zhang
2019-09-17  5:48 ` [PATCH v10 3/9] drm/i915: vgpu pv command buffer support Xiaolin Zhang
2019-09-17  9:45   ` Chris Wilson
2019-09-17  5:48 ` [PATCH v10 4/9] drm/i915: vgpu ppgtt update pv optimization Xiaolin Zhang
2019-09-17  9:43   ` Chris Wilson
2019-09-17  5:48 ` [PATCH v10 5/9] drm/i915: vgpu context submission " Xiaolin Zhang
2019-09-17  9:54   ` Chris Wilson
2019-09-17  5:48 ` [PATCH v10 6/9] drm/i915/gvt: GVTg handle pv_caps PVINFO register Xiaolin Zhang
2019-09-17  5:48 ` [PATCH v10 7/9] drm/i915/gvt: GVTg handle shared_page setup Xiaolin Zhang
2019-09-17  5:48 ` [PATCH v10 8/9] drm/i915/gvt: GVTg support ppgtt pv optimization Xiaolin Zhang
2019-09-17  5:48 ` [PATCH v10 9/9] drm/i915/gvt: GVTg support context submission " Xiaolin Zhang
2019-09-17  6:12 ` ✗ Fi.CI.CHECKPATCH: warning for i915 vgpu PV to improve vgpu performance Patchwork
2019-09-17  7:03 ` ✓ Fi.CI.BAT: success " Patchwork
2019-09-17  9:55 ` ✓ Fi.CI.IGT: " 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=1568699301-2799-1-git-send-email-xiaolin.zhang@intel.com \
    --to=xiaolin.zhang@intel.com \
    --cc=hang.yuan@intel.com \
    --cc=intel-gfx@lists.freedesktop.org \
    --cc=intel-gvt-dev@lists.freedesktop.org \
    --cc=zhenyu.z.wang@intel.com \
    --cc=zhiyuan.lv@intel.com \
    /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.