<html>
  <head>
    <meta content="text/html; charset=UTF-8" http-equiv="Content-Type">
  </head>
  <body text="#000000" bgcolor="#FFFFFF">
    That should be next steps. Currently we only have one shadow
    context. My idea is we can have a parm to specify the amount of
    pre-shadow later and check the status of memory
    consumption/performance gain. We can do it step by step. It's always
    good to introduce something step by step.<br>
    <br>
    <div class="moz-cite-prefix">On 06/06/17 13:59, Du, Changbin wrote:<br>
    </div>
    <blockquote cite="mid:20170606055935.GB17529@intel.com" type="cite">
      <pre wrap="">On Tue, Jun 06, 2017 at 10:38:56AM +0800, Gao, Ping A wrote:
</pre>
      <blockquote type="cite">
        <blockquote type="cite">
          <blockquote type="cite">
            <blockquote type="cite">
              <blockquote type="cite">
                <pre wrap="">+   */
+       if (vgpu->gvt->scheduler.current_vgpu != vgpu &&
+                               list_empty(workload_q_head(vgpu, ring_id))) {
+               mutex_lock(&dev_priv->drm.struct_mutex);
+               intel_gvt_audit_and_shadow_workload(workload);
+               mutex_unlock(&dev_priv->drm.struct_mutex);
+       }
+
</pre>
              </blockquote>
              <pre wrap="">Is there any reason why a pre-shadow cannot happen when current_vgpu ==
vgpu and workload q is empty?
</pre>
            </blockquote>
            <pre wrap="">As there is only one pre-allocated obj-buf for shadow, it's able to
shadow the first workload only in the q. The q is empty before inqueue
means current workload will be the first node of the q.

current_vgpu!=vgpu, it try to emphasize that the performance could get
improved only when pre-shadow happen under this condition , that's why
we need pre-shadow. Logically it can be removed but the purpose of
pre-shadow would be not very clear when reading the code.
</pre>
          </blockquote>
          <pre wrap="">I got the background in our previous talk :P . I'm just curious. From my 
point of view, the gap comes from the workload scheduler thread. If we 
pre-shadow workload as much as possible, that would be nicer. Do you 
observe performance drop/gain changed after remove current->vgpu != vgpu? :P
</pre>
        </blockquote>
        <pre wrap="">
There is no benefit to do pre-shadow if current->vgpu == vgpu, so remove
current->vgpu != vgpu has no performance impact I think.

Just notice that this condition should removed as current->vgpu==vgpu
could been changed soon due to scheduler,  it would make current vgpu
miss some chance to do pre-shadow.  I will remove it at next version :)

</pre>
      </blockquote>
      <pre wrap="">Since guest prefer submit two workloads one time. So in theory we can shadow the 
sencond workload while first one is running. This is an optimization even for
single VM. Do you think wether this is doable?


</pre>
      <blockquote type="cite">
        <pre wrap="">
_______________________________________________
intel-gvt-dev mailing list
<a class="moz-txt-link-abbreviated" href="mailto:intel-gvt-dev@lists.freedesktop.org">intel-gvt-dev@lists.freedesktop.org</a>
<a class="moz-txt-link-freetext" href="https://lists.freedesktop.org/mailman/listinfo/intel-gvt-dev">https://lists.freedesktop.org/mailman/listinfo/intel-gvt-dev</a>
</pre>
      </blockquote>
      <pre wrap="">
</pre>
      <br>
      <fieldset class="mimeAttachmentHeader"></fieldset>
      <br>
      <pre wrap="">_______________________________________________
intel-gvt-dev mailing list
<a class="moz-txt-link-abbreviated" href="mailto:intel-gvt-dev@lists.freedesktop.org">intel-gvt-dev@lists.freedesktop.org</a>
<a class="moz-txt-link-freetext" href="https://lists.freedesktop.org/mailman/listinfo/intel-gvt-dev">https://lists.freedesktop.org/mailman/listinfo/intel-gvt-dev</a>
</pre>
    </blockquote>
    <br>
  </body>
</html>