[PATCH] drm/i915/gvt: trigger reschedule event when current vgpu is idle_vgpu once get new workload submission

Zhenyu Wang zhenyuw at linux.intel.com
Fri May 26 08:13:39 UTC 2017


On 2017.05.26 10:31:08 +0800, Weinan Li wrote:
> This patch can improve the schedule performance with single vGPU, and
> improve the responce speed in multiple vGPU environment.
> 
> Time slice based scheduler with Qos need to control the GPU utilization per
> vgpu, if no workload detected in all the active vGPUs or GPU utilization of
> all the active vGPUs exceed the threshold controlled by Qos, scheduler will
> switch current vGPU to idle_vgpu. Then there is no chance to switch back to
> active vGPU until next time slice arrived.
> 
> This patch is used to immediately trigger a vGPU reschedule after receive a
> new workload when current vGPU is idle_vgpu, instead of original path which
> has to wait another timer interrupt to do so.
> 
> Signed-off-by: Weinan Li <weinan.z.li at intel.com>
> ---
>  drivers/gpu/drm/i915/gvt/scheduler.c | 7 +++++++
>  1 file changed, 7 insertions(+)
> 
> diff --git a/drivers/gpu/drm/i915/gvt/scheduler.c b/drivers/gpu/drm/i915/gvt/scheduler.c
> index f172b1c..a6080ca 100644
> --- a/drivers/gpu/drm/i915/gvt/scheduler.c
> +++ b/drivers/gpu/drm/i915/gvt/scheduler.c
> @@ -279,6 +279,13 @@ static struct intel_vgpu_workload *pick_next_workload(
>  		goto out;
>  	}
>  
> +	if (scheduler->current_vgpu == gvt->idle_vgpu) {
> +		gvt_dbg_sched("current vgpu is idle_vgpu, trigger reschedule");
> +		intel_gvt_request_service(gvt, INTEL_GVT_REQUEST_EVENT_SCHED);
> +		goto out;
> +	}
> +

pls rebase on latest gvt-staging with Ping's latest change.

> +
>  	if (list_empty(workload_q_head(scheduler->current_vgpu, ring_id))) {
>  		gvt_dbg_sched("ring id %d stop - no available workload\n",
>  				ring_id);
> -- 
> 1.9.1
> 
> _______________________________________________
> intel-gvt-dev mailing list
> intel-gvt-dev at lists.freedesktop.org
> https://lists.freedesktop.org/mailman/listinfo/intel-gvt-dev

-- 
Open Source Technology Center, Intel ltd.

$gpg --keyserver wwwkeys.pgp.net --recv-keys 4D781827
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 195 bytes
Desc: not available
URL: <https://lists.freedesktop.org/archives/intel-gvt-dev/attachments/20170526/1f244a02/attachment-0001.sig>


More information about the intel-gvt-dev mailing list