On Mon, Mar 13, 2017 at 12:03:30PM +0800, Zhenyu Wang wrote: > On 2017.03.13 10:47:11 +0800, changbin.du@xxxxxxxxx wrote: > > From: Changbin Du <changbin.du@xxxxxxxxx> > > > > GVTg has introduced the context status notifier to schedule the GVTg > > workload. At that time, the notifier is bound to GVTg context only, > > so GVTg is not aware of host workloads. > > > > Now we are going to improve GVTg's guest workload scheduler policy, > > and add Guc emulation support for new Gen graphics. Both these two > > features require acknowledgment for all contexts running on hardware. > > (But will not alter host workload.) So here try to make some change. > > > > The change is simple: > > 1. Move the context status notifier head from i915_gem_context to > > intel_engine_cs. Which means there is a notifier head per engine > > instead of per context. Execlist driver still call notifier for > > each context sched-in/out events of current engine. > > 2. At GVTg side, it binds a notifier_block for each physical engine > > at GVTg initialization period. Then GVTg can hear all context > > status events. > > > > In this patch, GVTg do nothing for host context event, but later > > will add a function there. But in any case, the notifier callback is > > a noop if this is no active vGPU. > > > > Since intel_gvt_init() is called at early initialization stage and > > require the status notifier head has been initiated, I initiate it in > > intel_engine_setup(). > > > > v2: remove a redundant newline. (chris) > > > > Signed-off-by: Changbin Du <changbin.du@xxxxxxxxx> > > Reviewed-by: Chris Wilson <chris@xxxxxxxxxxxxxxxxxx> > > Applied to gvt-next, thanks! It turns out this fixes a use-after-free bug that CI was falling over. Applied to dinq. Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=100232 -Chris -- Chris Wilson, Intel Open Source Technology Centre _______________________________________________ Intel-gfx mailing list Intel-gfx@xxxxxxxxxxxxxxxxxxxxx https://lists.freedesktop.org/mailman/listinfo/intel-gfx