On Thu, Feb 16, 2017 at 02:22:52PM +0000, Chris Wilson wrote:
> When the timer expires for checking on interrupt processing, check to
> see if any interrupts arrived within the last time period. If real
> interrupts are still being delivered, we can be reassured that we
> haven't missed the final interrupt as the waiter will still be woken.
> Only once all activity ceases, do we have to worry about the waiter
> never being woken and so need to install a timer to kick the waiter for
> a slow arrival of a seqno.
> 
> Signed-off-by: Chris Wilson <[email protected]>
> Cc: Tvrtko Ursulin <[email protected]>
> Reviewed-by: Tvrtko Ursulin <[email protected]>
> ---

> @@ -34,8 +39,9 @@ static void intel_breadcrumbs_hangcheck(unsigned long data)
>       if (!b->irq_enabled)
>               return;
>  
> -     if (time_before(jiffies, b->timeout)) {
> -             mod_timer(&b->hangcheck, b->timeout);
> +     if (b->hangcheck_interrupts != atomic_read(&engine->irq_count)) {
> +             b->hangcheck_interrupts = atomic_read(&engine->irq_count);
> +             mod_timer(&b->hangcheck, wait_timeout());
>               return;

Still toying with the idea of how to check for a delayed waiter - we
don't want to blame the hw if the waiter hasn't yet been run (perhaps
due to low priority on a loaded system).

Tempted to grab the b->first_wait and do a check against tsk->state.
Of course that may well be overkill!
-Chris

-- 
Chris Wilson, Intel Open Source Technology Centre
_______________________________________________
Intel-gfx mailing list
[email protected]
https://lists.freedesktop.org/mailman/listinfo/intel-gfx

Reply via email to