[PATCH 2/2] drm/i915/gvt: Audit and shadow workload during ELSP writing

Du, Changbin changbin.du at intel.com
Tue Jun 6 05:59:35 UTC 2017


On Tue, Jun 06, 2017 at 10:38:56AM +0800, Gao, Ping A wrote:
> >>>> +	 */
> >>>> +	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);
> >>>> +	}
> >>>> +
> >>> Is there any reason why a pre-shadow cannot happen when current_vgpu ==
> >>> vgpu and workload q is empty?
> >> 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.
> > 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
> 
> 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 :)
> 
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?


> 
> _______________________________________________
> intel-gvt-dev mailing list
> intel-gvt-dev at lists.freedesktop.org
> https://lists.freedesktop.org/mailman/listinfo/intel-gvt-dev

-- 
Thanks,
Changbin Du
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 473 bytes
Desc: not available
URL: <https://lists.freedesktop.org/archives/intel-gvt-dev/attachments/20170606/0984e0c7/attachment.sig>


More information about the intel-gvt-dev mailing list