[Intel-gfx] [PATCH] drm/i915: Wake up all waiters before idling
Chris Wilson
chris at chris-wilson.co.uk
Mon Mar 6 10:39:43 UTC 2017
On Mon, Mar 06, 2017 at 12:30:17PM +0200, Mika Kuoppala wrote:
> Chris Wilson <chris at chris-wilson.co.uk> writes:
> > + spin_lock_irq(&b->rb_lock);
> > + rbtree_postorder_for_each_entry_safe(wait, n, &b->waiters, node) {
> > + RB_CLEAR_NODE(&wait->node);
> > + if (wake_up_process(wait->tsk) && wait == b->irq_wait)
>
> Now it needs to be the first waiter. Due to that it is responsible
> to waking the rest?
Yes, it only matters if the first waiter was asleep as that is the
bottom-half. We expect all other watiers to be asleep, but if the
bottom-half was asleep that it means it wasn't processing the interrupt
but had missed the wakeup. (That hasn't changed, just the odd ordering of
the foreach requires a more interesting test.)
-Chris
More information about the Intel-gfx
mailing list