[Bug 104943] [CI] igt at perf_pmu@rc6 - dmesg-warn - BUG: sleeping function called from invalid context at drivers/base/power/runtime.c:1034 -> BUG: scheduling while atomic: perf_pmu/1513/0x00000004 -> DEBUG_LOCKS_WARN_ON(val > preempt_count())

bugzilla-daemon at freedesktop.org bugzilla-daemon at freedesktop.org
Tue Feb 6 14:31:56 UTC 2018


https://bugs.freedesktop.org/show_bug.cgi?id=104943

Chris Wilson <chris at chris-wilson.co.uk> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|NEW                         |RESOLVED
         Resolution|---                         |FIXED

--- Comment #1 from Chris Wilson <chris at chris-wilson.co.uk> ---
commit b2f78cda260bc6a1a2d382b1d85a29e69b5b3724
Author: Tvrtko Ursulin <tvrtko.ursulin at intel.com>
Date:   Mon Feb 5 09:34:48 2018 +0000

    drm/i915/pmu: Fix PMU enable vs execlists tasklet race

    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 at intel.com>
    Fixes: 99e48bf98dd0 ("drm/i915: Lock out execlist tasklet while peeking
inside for busy-stats")
    Testcase: igt/perf_pmu/enable-race-*
    Cc: Chris Wilson <chris at chris-wilson.co.uk>
    Cc: Tvrtko Ursulin <tvrtko.ursulin at intel.com>
    Cc: Jani Nikula <jani.nikula at linux.intel.com>
    Cc: Joonas Lahtinen <joonas.lahtinen at linux.intel.com>
    Cc: Rodrigo Vivi <rodrigo.vivi at intel.com>
    Cc: intel-gfx at lists.freedesktop.org
    Reviewed-by: Chris Wilson <chris at chris-wilson.co.uk>
    Link:
https://patchwork.freedesktop.org/patch/msgid/20180205093448.13877-1-tvrtko.ursulin@linux.intel.com

-- 
You are receiving this mail because:
You are the QA Contact for the bug.
You are the assignee for the bug.
You are on the CC list for the bug.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://lists.freedesktop.org/archives/intel-gfx-bugs/attachments/20180206/2fa7005b/attachment.html>


More information about the intel-gfx-bugs mailing list