[PATCH] drm/i915/gvt: avoid unnecessary vgpu switch

Zhenyu Wang zhenyu.z.wang at intel.com
Wed Apr 19 05:18:43 UTC 2017


On 2017.04.18 13:14:20 +0800, Zhenyu Wang wrote:
> On 2017.04.17 13:43:53 +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.
> > 
> > Signed-off-by: Ping Gao <ping.a.gao at intel.com>
> > ---
> >  drivers/gpu/drm/i915/gvt/sched_policy.c | 4 +++-
> >  1 file changed, 3 insertions(+), 1 deletion(-)
> > 
> > diff --git a/drivers/gpu/drm/i915/gvt/sched_policy.c b/drivers/gpu/drm/i915/gvt/sched_policy.c
> > index 79ba4b3..450a7ca 100644
> > --- a/drivers/gpu/drm/i915/gvt/sched_policy.c
> > +++ b/drivers/gpu/drm/i915/gvt/sched_policy.c
> > @@ -130,8 +130,10 @@ static void try_to_schedule_next_vgpu(struct intel_gvt *gvt)
> >  	ktime_t cur_time;
> >  
> >  	/* no target to schedule */
> > -	if (!scheduler->next_vgpu)
> > +	if (scheduler->next_vgpu == scheduler->current_vgpu) {
> > +		scheduler->next_vgpu = NULL;
> >  		return;
> > +	}
> >
> 
> ok, might clarify that upper caller will check next_vgpu NULL case
> so that can be removed inside this.
> 

Ping, pls update comment and resend. 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/20170419/921de78a/attachment.sig>


More information about the intel-gvt-dev mailing list