[PATCH] drm/i915/gvt: trigger reschedule event when current vgpu is idle_vgpu once get new workload submission
Weinan Li
weinan.z.li at intel.com
Fri May 26 02:31:08 UTC 2017
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;
+ }
+
+
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
More information about the intel-gvt-dev
mailing list