On Thu, Feb 16, 2017 at 03:17:30PM +0200, Mika Kuoppala wrote:
> Chris Wilson <[email protected]> writes:
> 
> > If an interrupt has been posted, and we were spinning on the active
> > seqno waiting for it to advance but it did not, then we can expect that
> > it will not see its advance in the immediate future
> 
> Why we can expect this?

The seqno is meant to arrive *before* the interrupt. The check is lazy,
but assume it is

irq_posted = test_bit(ENGINE_IRQ_BREADCRUMB, &req->engine->irq_posted);
if (seqno_passed())
        return true;
if (irq_posted)
        return false;

with the strong read ordering imposed. The reason why I think we can be
lax is that we expect the caller to check after spin_request reports
false (just it may do some other work in the meantime).

Note that the interrupt will only be detected if there is already a
waiter (or equivalent).
-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