drm/i915/gvt: Use real time to do timer check
authorZhipeng Gong <zhipeng.gong@intel.com>
Wed, 4 Apr 2018 00:43:52 +0000 (08:43 +0800)
committerZhi Wang <zhi.a.wang@intel.com>
Mon, 23 Apr 2018 05:09:31 +0000 (13:09 +0800)
commit292bb0d38a5714440b59ef910404408d5e9a8017
tree8b83b7f54e5273710fb9fc4fca5962ec81687fa9
parentfadec6eefe232696c5c471b40df33e6db616e854
drm/i915/gvt: Use real time to do timer check

intel_gvt_schedule check timer through a counter and is supposed
to wake up to increase the counter every ms.
In a system with heavy workload, gvt_service_thread can not get
a chance to run right after wake up and will be delayed several
milliseconds. As a result, one hundred counter interval means
several hundred milliseconds in real time.

This patch use real time instead of counter to do timer check.

v2: remove static variable. (Zhenyu)
v3: correct expire_time update. (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