• Chris Wilson's avatar
    drm/i915: Delay disabling the user interrupt for breadcrumbs · 67b807a8
    Chris Wilson authored
    A significant cost in setting up a wait is the overhead of enabling the
    interrupt. As we disable the interrupt whenever the queue of waiters is
    empty, if we are frequently waiting on alternating batches, we end up
    re-enabling the interrupt on a frequent basis. We do want to disable the
    interrupt during normal operations as under high load it may add several
    thousand interrupts/s - we have been known in the past to occupy whole
    cores with our interrupt handler after accidentally leaving user
    interrupts enabled. As a compromise, leave the interrupt enabled until
    the next IRQ, or the system is idle. This gives a small window for a
    waiter to keep the interrupt active and not be delayed by having to
    re-enable the interrupt.
    
    v2: Restore hangcheck/missed-irq detection for continuations
    v3: Be more careful restoring the hangcheck timer after reset
    v4: Be more careful restoring the fake irq after reset (if required!)
    v5: Redo changes to intel_engine_wakeup()
    v6: Factor out __intel_engine_wakeup()
    v7: Improve commentary for declaring a missed wakeup
    Signed-off-by: default avatarChris Wilson <chris@chris-wilson.co.uk>
    Cc: Tvrtko Ursulin <tvrtko.ursulin@intel.com>
    Cc: Mika Kuoppala <mika.kuoppala@linux.intel.com>
    Reviewed-by: default avatarTvrtko Ursulin <tvrtko.ursulin@intel.com>
    Link: http://patchwork.freedesktop.org/patch/msgid/20170227205850.2828-4-chris@chris-wilson.co.uk
    67b807a8
intel_breadcrumbs.c 24 KB