[PATCH v2] drm/i915/gvt: avoid unnecessary vgpu switch
Zhenyu Wang
zhenyu.z.wang at intel.com
Thu Apr 20 05:57:05 UTC 2017
On 2017.04.19 14:02:31 +0800, Ping Gao wrote:
> It's no need to switch vgpu if next vgpu is the same with current
> vgpu, otherwise it will make performance drop in some case.
>
> v2: correct the comments.
>
> Signed-off-by: Ping Gao <ping.a.gao at intel.com>
> ---
> drivers/gpu/drm/i915/gvt/sched_policy.c | 8 ++++++--
> 1 file changed, 6 insertions(+), 2 deletions(-)
>
> diff --git a/drivers/gpu/drm/i915/gvt/sched_policy.c b/drivers/gpu/drm/i915/gvt/sched_policy.c
> index 79ba4b3..f25ff13 100644
> --- a/drivers/gpu/drm/i915/gvt/sched_policy.c
> +++ b/drivers/gpu/drm/i915/gvt/sched_policy.c
> @@ -129,9 +129,13 @@ static void try_to_schedule_next_vgpu(struct intel_gvt *gvt)
> struct vgpu_sched_data *vgpu_data;
> ktime_t cur_time;
>
> - /* no target to schedule */
> - if (!scheduler->next_vgpu)
> + /* no need to schedule if next_vgpu is the same with current_vgpu,
> + * let scheduler chose next_vgpu again by setting it to NULL.
> + */
> + if (scheduler->next_vgpu == scheduler->current_vgpu) {
> + scheduler->next_vgpu = NULL;
> return;
> + }
>
> /*
> * after the flag is set, workload dispatch thread will
> --
applied, thanks!
--
Open Source Technology Center, Intel ltd.
$gpg --keyserver wwwkeys.pgp.net --recv-keys 4D781827
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 195 bytes
Desc: not available
URL: <https://lists.freedesktop.org/archives/intel-gvt-dev/attachments/20170420/3ff1f225/attachment.sig>
More information about the intel-gvt-dev
mailing list