[PATCH 5/5] drm/i915/gvt: set scheduler time to 10ms
Ping Gao
ping.a.gao at intel.com
Thu Jan 26 01:19:18 UTC 2017
The delay work can only be accurate at 10ms level, so change the
scheduler trigger time to 10ms for performance control.
Signed-off-by: Ping Gao <ping.a.gao at intel.com>
---
drivers/gpu/drm/i915/gvt/sched_policy.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/drivers/gpu/drm/i915/gvt/sched_policy.c b/drivers/gpu/drm/i915/gvt/sched_policy.c
index d676928..f8a9cec 100644
--- a/drivers/gpu/drm/i915/gvt/sched_policy.c
+++ b/drivers/gpu/drm/i915/gvt/sched_policy.c
@@ -208,7 +208,7 @@ static void tbs_sched_func(struct work_struct *work)
mutex_lock(&gvt->lock);
if (gvt_nr_in_runq(sched_data) > 1 &&
- !(timer_check++ % GVT_TS_BALANCE_PERIOD))
+ !(timer_check++ % 10))
gvt_timeslice_balance(sched_data);
/* no vgpu or has already had a target */
@@ -282,7 +282,7 @@ static int tbs_sched_init(struct intel_gvt *gvt)
INIT_LIST_HEAD(&data->runq_head);
INIT_DELAYED_WORK(&data->work, tbs_sched_func);
- data->period = GVT_DEFAULT_TIME_SLICE;
+ data->period = usecs_to_jiffies(1000);
data->gvt = gvt;
scheduler->sched_data = data;
--
2.7.4
More information about the intel-gvt-dev
mailing list