• A
    KVM: avoid taking ioapic mutex for non-ioapic EOIs · 46a929bc
    Avi Kivity 提交于
    When the guest acknowledges an interrupt, it sends an EOI message to the local
    apic, which broadcasts it to the ioapic.  To handle the EOI, we need to take
    the ioapic mutex.
    
    On large guests, this causes a lot of contention on this mutex.  Since large
    guests usually don't route interrupts via the ioapic (they use msi instead),
    this is completely unnecessary.
    
    Avoid taking the mutex by introducing a handled_vectors bitmap.  Before taking
    the mutex, check if the ioapic was actually responsible for the acked vector.
    If not, we can return early.
    Signed-off-by: NAvi Kivity <avi@redhat.com>
    Signed-off-by: NMarcelo Tosatti <mtosatti@redhat.com>
    46a929bc
ioapic.c 10.4 KB