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

Li, Weinan Z weinan.z.li at intel.com
Fri May 26 08:54:05 UTC 2017


Thanks Zhenyu, I've rebased to latest gvt-staging.

> -----Original Message-----
> From: Li, Weinan Z
> Sent: Friday, May 26, 2017 4:46 PM
> To: intel-gvt-dev at lists.freedesktop.org
> Cc: Li, Weinan Z <weinan.z.li at intel.com>
> Subject: [PATCH v2] drm/i915/gvt: trigger reschedule event when current vgpu
> is idle_vgpu once get new workload submission
> 
> 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 | 6 ++++++
>  1 file changed, 6 insertions(+)
> 
> diff --git a/drivers/gpu/drm/i915/gvt/scheduler.c
> b/drivers/gpu/drm/i915/gvt/scheduler.c
> index 488fdea..23a2208 100644
> --- a/drivers/gpu/drm/i915/gvt/scheduler.c
> +++ b/drivers/gpu/drm/i915/gvt/scheduler.c
> @@ -301,6 +301,12 @@ 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;
> +	}
> +
>  	if (list_empty(workload_q_head(scheduler->current_vgpu, ring_id)))
>  		goto out;
> 
> --
> 1.9.1



More information about the intel-gvt-dev mailing list