[PATCH v6 5/7] drm/i915/gvt: add basic function for weight control
Tian, Kevin
kevin.tian at intel.com
Thu Mar 30 01:28:42 UTC 2017
> From: Ping Gao
> Sent: Thursday, March 30, 2017 12:37 AM
>
> This method tries to guarantee precision in second level, with the adjustment
> conducted in every 100ms. At the end of each vGPU switch calculate the
> sched time and subtract it from the time slice allocated; the allocated time
> slice for every 100ms together with remaining timeslice, will be used to
> decide how much timeslice allocated to this vGPU in the next 100ms slice,
> with the end goal to guarantee weight ratio in second level.
>
> Signed-off-by: Ping Gao <ping.a.gao at intel.com>
Reviewed-by: Kevin Tian <kevin.tian at intel.com>, with one small comment:
> +static void gvt_balance_timeslice(struct gvt_sched_data *sched_data) {
> + struct vgpu_sched_data *vgpu_data;
> + struct list_head *pos;
> + static uint64_t stage_check;
> + int stage = stage_check++ % GVT_TS_BALANCE_STAGE_NUM;
> +
> + /* The timeslice accumulation reset at stage 0, it
> + * been allocated again without add the left/debt before.
which is allocated again without adding previous debt.
> + */
> + if (stage == 0) {
[...]
More information about the intel-gvt-dev
mailing list