Quoting Tvrtko Ursulin (2018-02-05 09:34:48) > From: Tvrtko Ursulin <tvrtko.ursulin@xxxxxxxxx> > > Commit 99e48bf98dd0 ("drm/i915: Lock out execlist tasklet while peeking > inside for busy-stats") added a tasklet_disable call in busy stats > enabling, but we failed to understand that the PMU enable callback runs > as an hard IRQ (IPI). > > Consequence of this is that the PMU enable callback can interrupt the > execlists tasklet, and will then deadlock when it calls > intel_engine_stats_enable->tasklet_disable. > > To fix this, I realized it is possible to move the engine stats enablement > and disablement to PMU event init and destroy hooks. This allows for much > simpler implementation since those hooks run in normal context (can > sleep). > > v2: Extract engine_event_destroy. (Chris Wilson) > > Signed-off-by: Tvrtko Ursulin <tvrtko.ursulin@xxxxxxxxx> > Fixes: 99e48bf98dd0 ("drm/i915: Lock out execlist tasklet while peeking inside for busy-stats") > Testcase: igt/perf_pmu/enable-race-* > Cc: Chris Wilson <chris@xxxxxxxxxxxxxxxxxx> > Cc: Tvrtko Ursulin <tvrtko.ursulin@xxxxxxxxx> > Cc: Jani Nikula <jani.nikula@xxxxxxxxxxxxxxx> > Cc: Joonas Lahtinen <joonas.lahtinen@xxxxxxxxxxxxxxx> > Cc: Rodrigo Vivi <rodrigo.vivi@xxxxxxxxx> > Cc: intel-gfx@xxxxxxxxxxxxxxxxxxxxx I didn't have any nightmares about this, Reviewed-by: Chris Wilson <chris@xxxxxxxxxxxxxxxxxx> -Chris _______________________________________________ Intel-gfx mailing list Intel-gfx@xxxxxxxxxxxxxxxxxxxxx https://lists.freedesktop.org/mailman/listinfo/intel-gfx