Quoting Tvrtko Ursulin (2020-02-25 19:07:43) > > On 24/02/2020 09:59, Chris Wilson wrote: > > -int i915_active_wait(struct i915_active *ref) > > +static int flush_barrier(struct active_node *it) > > { > > - struct active_node *it, *n; > > - int err = 0; > > + struct intel_engine_cs *engine; > > > > - might_sleep(); > > + if (!is_barrier(&it->base)) > > + return 0; > > > > - if (!i915_active_acquire_if_busy(ref)) > > + engine = __barrier_to_engine(it); > > + smp_rmb(); /* serialise with add_active_barriers */ > > + if (!is_barrier(&it->base)) > > return 0; > > What is the purpose of the first !is_barrier check? Just to kind of look > better by not calling __bariier_to_engine on the wrong thing? Yeah, and that smp_rmb() is on the expensive side (enough to justify a branch). If I was confident I would mark up that first !is_barrier() with likely(). Hmm, does the kernel still have the infrastructure to warn those annotations are wrong? -Chris _______________________________________________ Intel-gfx mailing list Intel-gfx@xxxxxxxxxxxxxxxxxxxxx https://lists.freedesktop.org/mailman/listinfo/intel-gfx