Quoting Tvrtko Ursulin (2018-02-14 18:50:31) > +ktime_t intel_context_engine_get_busy_time(struct i915_gem_context *ctx, > + struct intel_engine_cs *engine) > +{ > + struct intel_context *ce = &ctx->engine[engine->id]; > + ktime_t total; > + > + spin_lock_irq(&ce->stats.lock); > + > + total = ce->stats.total; > + > + if (ce->stats.active) > + total = ktime_add(total, > + ktime_sub(ktime_get(), ce->stats.start)); > + > + spin_unlock_irq(&ce->stats.lock); Looks like we can just use a seqlock here. -Chris _______________________________________________ Intel-gfx mailing list Intel-gfx@xxxxxxxxxxxxxxxxxxxxx https://lists.freedesktop.org/mailman/listinfo/intel-gfx