Re: [Qemu-devel] [RFC] create a single workqueue for each vm to update vm irq routing table

Avi Kivity
2013-11-28T11:16:59Z

On 11/28/2013 01:10 PM, Paolo Bonzini wrote:
> Il 28/11/2013 12:09, Gleb Natapov ha scritto:
>>> - if there are no callbacks, but there are readers, synchronize_srcu
>>> busy-loops for some time checking if the readers complete. After a
>>> while (20 us for synchronize_srcu, 120 us for
>>> synchronize_srcu_expedited) it gives up and starts using a workqueue to
>>> poll every millisecond. This should never happen unless
>> Unless what ? :) Unless reader is scheduled out?
> Yes. Or unless my brain is scheduled out in the middle of a sentence.
>

You need a grace period. Or just sleep().