[PATCH] drm/i915/gvt: implement per-vm mmio switching optimization
Du, Changbin
changbin.du at intel.com
Tue May 2 10:09:24 UTC 2017
On Tue, May 02, 2017 at 02:53:43AM -0700, Dong, Chuanxiao wrote:
> > > > according to the specific ring instead of all the rings? As after
> > > > switch to VGPU, other rings may also be used by VGPU.
> > > > >
> > > > Seems this aways is our defaut policy so far. We only switch the
> > > > ring which will be used, why switch other rings?
> > >
> > > The current switch policy is per request. If this request will use RCS, only
> > RCS is save/restore as other rings won't be touched. After switch to per-vm,
> > a VM is possible that send a batch of requests to i915, and these requests
> > may use different rings. So my understanding is after switch to per-vm, only
> > save/restore for one ring is not enough.
> > >
> > No, you missundstand this 'per-vm'. We still switch mmio per request. What
> > you think is not feasible if we must rely i915's scheduler.
>
> Eh....With per-vm switching, the switching between the VMs should be something like:
>
> Host i915 req0 (RCS) --- host i915 req1 (BCS) --- host i915 req2 (RCS) --- mmio switching to vgpu1 --- vgpu1 req0 (RCS) --- vgpu1 req1 (BCS) --- "mmio switching to host" --- host i915 req 3(BCS)
>
This case make sense. The sencond ring will not be switched. It is a problem.
May need a per-ring flag here.
> Based on your patch, "mmio switching to vgpu1" will only save the RCS mmio, right? Then vgpu1 req1 comes and uses the BCS which is not saved by "mmio switching to vgpu1". When "mmio switching to host", and your patch will restore the BCS for host which is actually not saved before...
>
Will not restore BCS, but just missed the mmio switch for BCS. RCS will be
restored.
> Thanks
> Chuanxiao
>
> >
> >
> > > Thanks
> > > Chuanxiao
> > >
> > > >
> > > >
> >
> > --
> > Thanks,
> > Changbin Du
--
Thanks,
Changbin Du
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 473 bytes
Desc: not available
URL: <https://lists.freedesktop.org/archives/intel-gvt-dev/attachments/20170502/08ee2950/attachment.sig>
More information about the intel-gvt-dev
mailing list