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

Zhi Wang zhi.a.wang at intel.com
Tue Jun 6 06:36:15 UTC 2017


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.

On 06/06/17 13:59, Du, Changbin wrote:
> 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
>
>
> _______________________________________________
> intel-gvt-dev mailing list
> intel-gvt-dev at lists.freedesktop.org
> https://lists.freedesktop.org/mailman/listinfo/intel-gvt-dev

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://lists.freedesktop.org/archives/intel-gvt-dev/attachments/20170606/2b110d24/attachment.html>


More information about the intel-gvt-dev mailing list