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

Avi Kivity
2013-11-28T10:17:05Z

On 11/28/2013 11:53 AM, Paolo Bonzini wrote:
> Il 28/11/2013 10:49, Avi Kivity ha scritto:
>> Linux is safe, it does interrupt migration from within the interrupt
>> handler. If you do that before the device-specific EOI, you won't get
>> another interrupt until programming the MSI is complete.
>>
>> Is virtio safe? IIRC it can post multiple interrupts without guest acks.
>>
>> Using call_rcu() is a better solution than srcu IMO. Less code changes,
>> consistently faster.
> call_rcu() has the problem of rate limiting, too. It wasn't such a
> great idea, I think.
>
> The QRCU I linked would work great latency-wise (it has roughly the same
> latency of an rwsem but readers are lock-free). However, the locked
> operations in the read path would hurt because of cache misses, so it's
> not good either.
>

I guess srcu would work. Do you know what's the typical write-side
latency there? (in terms of what it waits for, not nanoseconds).