From: "Du, Changbin" <changbin.du@intel.com>
To: Chris Wilson <chris@chris-wilson.co.uk>
Cc: intel-gfx@lists.freedesktop.org, daniel.vetter@intel.com
Subject: Re: [PATCH] drm/i915: make context status notifier head be per engine
Date: Mon, 13 Mar 2017 10:14:26 +0800 [thread overview]
Message-ID: <20170313021426.GA4657@intel.com> (raw)
In-Reply-To: <20170310171717.GF28427@nuc-i3427.alporthouse.com>
[-- Attachment #1.1: Type: text/plain, Size: 3090 bytes --]
hi, chris,
On Fri, Mar 10, 2017 at 05:17:17PM +0000, Chris Wilson wrote:
> On Thu, Mar 09, 2017 at 07:27:24PM +0800, changbin.du@intel.com wrote:
> > From: Changbin Du <changbin.du@intel.com>
> >
> > 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().
> >
> > Signed-off-by: Changbin Du <changbin.du@intel.com>
> Reviewed-by: Chris Wilson <chris@chris-wilson.co.uk>
>
> I presume you will apply this via gvt?
>
Sure, I'll sync with zhenyu about this. Then update patch with below
'bonus newline' fixed. Thanks.
> > diff --git a/drivers/gpu/drm/i915/gvt/scheduler.c b/drivers/gpu/drm/i915/gvt/scheduler.c
> > index d3a56c9..64875ec 100644
> > --- a/drivers/gpu/drm/i915/gvt/scheduler.c
> > +++ b/drivers/gpu/drm/i915/gvt/scheduler.c
> > @@ -127,15 +127,14 @@ static int populate_shadow_context(struct intel_vgpu_workload *workload)
> > return 0;
> > }
> >
> > +
>
> Bonus newline
>
> > static int shadow_context_status_change(struct notifier_block *nb,
> > unsigned long action, void *data)
> > {
> > - struct intel_vgpu *vgpu = container_of(nb,
> > - struct intel_vgpu, shadow_ctx_notifier_block);
> > - struct drm_i915_gem_request *req =
> > - (struct drm_i915_gem_request *)data;
> > - struct intel_gvt_workload_scheduler *scheduler =
> > - &vgpu->gvt->scheduler;
> > + struct drm_i915_gem_request *req = (struct drm_i915_gem_request *)data;
> > + struct intel_gvt *gvt = container_of(nb, struct intel_gvt,
> > + shadow_ctx_notifier_block[req->engine->id]);
> > + struct intel_gvt_workload_scheduler *scheduler = &gvt->scheduler;
> > struct intel_vgpu_workload *workload =
> > scheduler->current_workload[req->engine->id];
> >
>
> --
> Chris Wilson, Intel Open Source Technology Centre
--
Thanks,
Changbin Du
[-- Attachment #1.2: signature.asc --]
[-- Type: application/pgp-signature, Size: 473 bytes --]
[-- Attachment #2: Type: text/plain, Size: 160 bytes --]
_______________________________________________
Intel-gfx mailing list
Intel-gfx@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/intel-gfx
next prev parent reply other threads:[~2017-03-13 2:16 UTC|newest]
Thread overview: 13+ messages / expand[flat|nested] mbox.gz Atom feed top
2017-03-02 11:23 [RFC PATCH] drm/i915: make context status notifier head be per engine changbin.du
2017-03-02 11:47 ` ✗ Fi.CI.BAT: warning for " Patchwork
2017-03-09 8:44 ` [RFC PATCH] " Du, Changbin
2017-03-09 11:27 ` [PATCH] " changbin.du
2017-03-10 17:17 ` Chris Wilson
2017-03-13 2:14 ` Du, Changbin [this message]
2017-03-13 2:47 ` [PATCH v2] " changbin.du
2017-03-13 4:03 ` Zhenyu Wang
2017-03-16 16:28 ` Chris Wilson
2017-03-17 2:28 ` Du, Changbin
2017-03-09 15:22 ` ✓ Fi.CI.BAT: success for drm/i915: make context status notifier head be per engine (rev2) Patchwork
2017-03-13 4:25 ` ✗ Fi.CI.BAT: failure for drm/i915: make context status notifier head be per engine (rev3) Patchwork
-- strict thread matches above, loose matches on Subject: below --
2017-03-21 14:23 Fixes that failed to backport to v4.11-rc1 Jani Nikula
2017-03-21 14:47 ` [PATCH] drm/i915: make context status notifier head be per engine Chris Wilson
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20170313021426.GA4657@intel.com \
--to=changbin.du@intel.com \
--cc=chris@chris-wilson.co.uk \
--cc=daniel.vetter@intel.com \
--cc=intel-gfx@lists.freedesktop.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox