Re: [PATCH v6 7/9] drm/i915: Introduce execlist context status change notification

Joonas Lahtinen
2016-06-08T07:50:01Z

On ti, 2016-06-07 at 15:29 +0000, Wang, Zhi A wrote:
>
> >
> > -----Original Message-----
> > From: Joonas Lahtinen [mailto:joonas.lahtinen@linux.intel.com]
> > Sent: Friday, June 03, 2016 12:40 PM
> > To: Wang, Zhi A <zhi.a.wang@intel.com>; intel-gfx@lists.freedesktop.org;
> > tvrtko.ursulin@linux.intel.com; Tian, Kevin <kevin.tian@intel.com>; Lv, Zhiyuan
> > <zhiyuan.lv@intel.com>; chris@chris-wilson.co.uk
> > Subject: Re: [PATCH v6 7/9] drm/i915: Introduce execlist context status change
> > notification
> >
> > On to, 2016-06-02 at 12:36 -0400, Zhi Wang wrote:
> > >
> > > + if (!IS_ENABLED(CONFIG_DRM_I915_GVT))
> > > + return;
> > > +
> > > + if (!rq->ctx->enable_lrc_status_change_notification)
> > > + return;
> > > +
> > I think above line should be dropped, just don't register notifier for context that
> > does not want notifications, and if the chain is empty, no call is made.
> >
> I keep this in v7 as I think a "if" here is much cheaper than the rcu stuff in atomic_notifier_call_chain() with a lot of "if" even when the chain is empty. :)

If empty notifier call chain is too heavy, then we should improve it
instead of going around. Do we have some benchmarks on the difference?

Regards, Joonas
--
Joonas Lahtinen
Open Source Technology Center
Intel Corporation