]> rtime.felk.cvut.cz Git - linux-imx.git/commit
drm/i915: Only slightly increment hangcheck score if we succesfully kick a ring
authorChris Wilson <chris@chris-wilson.co.uk>
Mon, 10 Jun 2013 10:20:20 +0000 (11:20 +0100)
committerDaniel Vetter <daniel.vetter@ffwll.ch>
Tue, 11 Jun 2013 09:44:00 +0000 (11:44 +0200)
commit9107e9d227e3b0893829baee4ac59feb874d4c23
treee95c4b8646977e744fedc6df20567cabeb28c8b8
parent50f018dff180942dc40e601de6e97145a4aaeaa9
drm/i915: Only slightly increment hangcheck score if we succesfully kick a ring

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 05407ff889ceebe383aa5907219f86582ef96b72
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=65394
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
Cc: Mika Kuoppala <mika.kuoppala@linux.intel.com>
Cc: Ben Widawsky <ben@bwidawsk.net>
Reviewed-by: Mika Kuoppala <mika.kuoppala@intel.com>
Signed-off-by: Daniel Vetter <daniel.vetter@ffwll.ch>
drivers/gpu/drm/i915/i915_irq.c