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

Joonas Lahtinen joonas.lahtinen at linux.intel.com
Wed Jun 8 07:49:58 UTC 2016


On ti, 2016-06-07 at 15:29 +0000, Wang, Zhi A wrote:
> 
> > 
> > -----Original Message-----
> > From: Joonas Lahtinen [mailto:joonas.lahtinen at linux.intel.com]
> > Sent: Friday, June 03, 2016 12:40 PM
> > To: Wang, Zhi A <zhi.a.wang at intel.com>; intel-gfx at lists.freedesktop.org;
> > tvrtko.ursulin at linux.intel.com; Tian, Kevin <kevin.tian at intel.com>; Lv, Zhiyuan
> > <zhiyuan.lv at intel.com>; chris at 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


More information about the Intel-gfx mailing list