]> asedeno.scripts.mit.edu Git - linux.git/commit
drm/i915/gvt: Update time slice more frequently
authorZhipeng Gong <zhipeng.gong@intel.com>
Wed, 4 Apr 2018 00:43:53 +0000 (08:43 +0800)
committerZhi Wang <zhi.a.wang@intel.com>
Mon, 23 Apr 2018 05:09:32 +0000 (13:09 +0800)
commit89babe7cf18e4f93c6ba1e6abfe2e5aa5e4fc66c
tree347a03cf59e6bb8ae4cc522876b8160288f9b807
parent292bb0d38a5714440b59ef910404408d5e9a8017
drm/i915/gvt: Update time slice more frequently

When there is only one vGPU in GVT-g and it submits workloads
continuously, it will not be scheduled out, vgpu_update_timeslice
is not called and its sched_in_time is not updated in a long time,
which can be several seconds or longer.
Once GVT-g pauses to submit workload for this vGPU due to heavy
host CPU workload, this vGPU get scheduled out and
vgpu_update_timeslice is called, its left_ts will be subtract
by a big value from sched_out_time - sched_in_time.
When GVT-g is going to submit workload for this vGPU again,
it will not be scheduled in until gvt_balance_timeslice reaches
stage 0 and reset its left_ts, which introduces several
hunderand milliseconds latency.

This patch updates time slice in every ms to update sched_in_time
timely.

v2: revise commit message
v3: use more concise expr. (Zhenyu)

Signed-off-by: Zhipeng Gong <zhipeng.gong@intel.com>
Cc: Zhenyu Wang <zhenyuw@linux.intel.com>
Cc: Min He <min.he@intel.com>
Signed-off-by: Zhi Wang <zhi.a.wang@intel.com>
drivers/gpu/drm/i915/gvt/sched_policy.c