All of lore.kernel.org
 help / color / mirror / Atom feed
From: Chris Wilson <chris@chris-wilson.co.uk>
To: Xiaolin Zhang <xiaolin.zhang@intel.com>,
	intel-gfx@lists.freedesktop.org,
	intel-gvt-dev@lists.freedesktop.org
Cc: zhenyu.z.wang@intel.com, hang.yuan@intel.com, zhiyuan.lv@intel.com
Subject: Re: [PATCH v4 4/8] drm/i915: vgpu context submission pv optimization
Date: Fri, 29 Mar 2019 19:14:04 +0000	[thread overview]
Message-ID: <155388684392.24691.4103217140609550300@skylake-alporthouse-com> (raw)
In-Reply-To: <1553866364-111114-5-git-send-email-xiaolin.zhang@intel.com>

Quoting Xiaolin Zhang (2019-03-29 13:32:40)
> +       spin_lock(&engine->i915->vgpu.shared_page_lock);
> +       shared_page->ring_id = engine->id;
> +       for (n = 0; n < execlists_num_ports(execlists); n++)
> +               shared_page->descs[n] = descs[n];
> +
> +       __raw_i915_write32(uncore, vgtif_reg(g2v_notify),
> +                       VGT_G2V_PV_SUBMISSION);

There's no serialisation with the consumer here. The
shared_page->descs[] will be clobbered by a second engine before they
are read by pv. There should be a wait-for-ack here, or separate
channels for each engine. In execlists, we avoid this by not dequeuing
until after we get a response/ack from HW.

Preemption? I guess preemption was turned off, or else you have to worry
about the same engine overwriting the desc[] (if no ack).
-Chris
_______________________________________________
Intel-gfx mailing list
Intel-gfx@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/intel-gfx

  parent reply	other threads:[~2019-03-29 19:14 UTC|newest]

Thread overview: 17+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2019-03-29 13:32 [PATCH v4 0/8] i915 vgpu PV to improve vgpu performance Xiaolin Zhang
2019-03-29  5:00 ` ✗ Fi.CI.BAT: failure for " Patchwork
2019-03-29 13:32 ` [PATCH v4 1/8] drm/i915: introduced vgpu pv capability Xiaolin Zhang
2019-03-29 13:32 ` [PATCH v4 2/8] drm/i915: vgpu shared memory setup for pv optimization Xiaolin Zhang
2019-03-29 13:32 ` [PATCH v4 3/8] drm/i915: vgpu ppgtt update " Xiaolin Zhang
2019-03-29 13:32 ` [PATCH v4 4/8] drm/i915: vgpu context submission " Xiaolin Zhang
2019-03-29  7:15   ` Chris Wilson
2019-03-29 15:40   ` Chris Wilson
2019-04-11  5:46     ` Zhang, Xiaolin
2019-03-29 19:14   ` Chris Wilson [this message]
2019-04-11  5:49     ` Zhang, Xiaolin
2019-03-29 13:32 ` [PATCH v4 5/8] drm/i915/gvt: GVTg handle pv_caps PVINFO register Xiaolin Zhang
2019-03-29 13:32 ` [PATCH v4 6/8] drm/i915/gvt: GVTg handle shared_page setup Xiaolin Zhang
2019-03-29 13:32 ` [PATCH v4 7/8] drm/i915/gvt: GVTg support ppgtt pv optimization Xiaolin Zhang
2019-03-29 13:32 ` [PATCH v4 8/8] drm/i915/gvt: GVTg support context submission " Xiaolin Zhang
2019-03-29 16:05 ` [PATCH v4 0/8] i915 vgpu PV to improve vgpu performance Chris Wilson
2019-04-11  5:54   ` Zhang, Xiaolin

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=155388684392.24691.4103217140609550300@skylake-alporthouse-com \
    --to=chris@chris-wilson.co.uk \
    --cc=hang.yuan@intel.com \
    --cc=intel-gfx@lists.freedesktop.org \
    --cc=intel-gvt-dev@lists.freedesktop.org \
    --cc=xiaolin.zhang@intel.com \
    --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.