• C
    drm/i915: Only slightly increment hangcheck score if we succesfully kick a ring · 9107e9d2
    Chris Wilson 提交于
    After kicking a ring, it should be free to make progress again and so
    should not be accused of being stuck until hangcheck fires once more. In
    order to catch a denial-of-service within a batch or across multiple
    batches, we still do increment the hangcheck score - just not as
    severely so that it takes multiple kicks to fail.
    
    This should address part of Ben's justified criticism of
    
    commit 05407ff8
    Author: Mika Kuoppala <mika.kuoppala@linux.intel.com>
    Date:   Thu May 30 09:04:29 2013 +0300
    
        drm/i915: detect hang using per ring hangcheck_score
    
    "There's also another corner case on the kick. If the seqno = 2
    (though not stuck), and on the 3rd hangcheck, the ring is stuck, and
    we try to kick it... we don't actually try to find out if the kick
    helped."
    
    v2: Make sure we catch DoS attempts with batches full of invalid WAITs.
    v3: Preserve the ability to detect loops by always charging the ring
        if it is busy on the same request.
    v4: Make sure we queue another check if on a new batch
    
    References: https://bugs.freedesktop.org/show_bug.cgi?id=65394Signed-off-by: NChris Wilson <chris@chris-wilson.co.uk>
    Cc: Mika Kuoppala <mika.kuoppala@linux.intel.com>
    Cc: Ben Widawsky <ben@bwidawsk.net>
    Reviewed-by: NMika Kuoppala <mika.kuoppala@intel.com>
    Signed-off-by: NDaniel Vetter <daniel.vetter@ffwll.ch>
    9107e9d2
i915_irq.c 101.5 KB