On ti, 2016-06-07 at 15:29 +0000, Wang, Zhi A wrote: > > > > > -----Original Message----- > > From: Joonas Lahtinen [mailto:[email protected]] > > Sent: Friday, June 03, 2016 12:40 PM > > To: Wang, Zhi A <[email protected]>; [email protected]; > > [email protected]; Tian, Kevin <[email protected]>; Lv, > > Zhiyuan > > <[email protected]>; [email protected] > > 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 _______________________________________________ Intel-gfx mailing list [email protected] https://lists.freedesktop.org/mailman/listinfo/intel-gfx
