RE: [PATCH] drm/i915/gvt: Fix gvt scheduler interval time

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 




> -----Original Message-----
> From: intel-gvt-dev [mailto:intel-gvt-dev-bounces@xxxxxxxxxxxxxxxxxxxxx] On
> Behalf Of Zhenyu Wang
> Sent: Friday, March 17, 2017 12:19 PM
> To: intel-gvt-dev@xxxxxxxxxxxxxxxxxxxxx
> Cc: v4.10+@xxxxxxxxxxxxxxx; #@freedesktop.org; stable@xxxxxxxxxxxxxxx;
> Wang, Zhi A <zhi.a.wang@xxxxxxxxx>
> Subject: [PATCH] drm/i915/gvt: Fix gvt scheduler interval time
> 
> Fix to correctly assign 1ms for gvt scheduler interval time, as previous code
> using HZ is pretty broken. And use no delay for start gvt scheduler function.
> 
> Fixes: 4b63960ebd3f ("drm/i915/gvt: vGPU schedule policy framework")
> Cc: Zhi Wang <zhi.a.wang@xxxxxxxxx>
> Cc: stable@xxxxxxxxxxxxxxx # v4.10+
> Signed-off-by: Zhenyu Wang <zhenyuw@xxxxxxxxxxxxxxx>

Acked-by: Chuanxiao Dong <chuanxiao.dong@xxxxxxxxx>

> ---
>  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 06c9584ac5f0..34b9acdf3479 100644
> --- a/drivers/gpu/drm/i915/gvt/sched_policy.c
> +++ b/drivers/gpu/drm/i915/gvt/sched_policy.c
> @@ -101,7 +101,7 @@ struct tbs_sched_data {
>  	struct list_head runq_head;
>  };
> 
> -#define GVT_DEFAULT_TIME_SLICE (1 * HZ / 1000)
> +#define GVT_DEFAULT_TIME_SLICE (msecs_to_jiffies(1))
> 
>  static void tbs_sched_func(struct work_struct *work)  { @@ -223,7 +223,7
> @@ static void tbs_sched_start_schedule(struct intel_vgpu *vgpu)
>  		return;
> 
>  	list_add_tail(&vgpu_data->list, &sched_data->runq_head);
> -	schedule_delayed_work(&sched_data->work, sched_data->period);
> +	schedule_delayed_work(&sched_data->work, 0);
>  }
> 
>  static void tbs_sched_stop_schedule(struct intel_vgpu *vgpu)
> --
> 2.11.0
> 
> _______________________________________________
> intel-gvt-dev mailing list
> intel-gvt-dev@xxxxxxxxxxxxxxxxxxxxx
> https://lists.freedesktop.org/mailman/listinfo/intel-gvt-dev




[Index of Archives]     [Linux Kernel]     [Kernel Development Newbies]     [Linux USB Devel]     [Video for Linux]     [Linux Audio Users]     [Yosemite Hiking]     [Linux Kernel]     [Linux SCSI]