[PATCH v4 0/9] make interrupt injection lockless (almost)

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



kvm->irq_lock protects too much stuff, but still fail to protect
everything it was design to protect (see ack notifiers call in pic). I
want to make IRQ injection fast path as lockless as possible. This patch
series removes kvm->irq_lock from irq injection path effectively making
interrupt injection to lapic lockless (several kvm_irq_delivery_to_apic()
may run in parallel), but access to lapic was never fully locked in the
first place. VCPU could access lapic in parallel with interrupt injection.
Patches 2-3 changes irq routing data structure to much more efficient one.

v1->v2:
  Drop MSI injection interface (for now).
  Use irq_lock to protect irq routing and ack notifiers.
  Splitting irq routing table changes to two patches (+ comments
  addressed).
  Drop ioapic/pic lock before calling ack notifiers.
v2->v3
  Drop patch that changes irq_lock to spinlock.
  Use mutex for ioapic lock.
  Do not call ack notifier if there is no GSI mapping.
  Call pic_clear_isr() after PIC state completely changed.
v3->v4
  Add patch to move irq sharing information to irqchip level
  Do not remove call of ack notifiers on pic reset (yet).
  Call irq->set() function outside of RCU read section

Gleb Natapov (9):
  Call pic_clear_isr() on pic reset to reuse logic there.
  Move irq sharing information to irqchip level.
  Change irq routing table to use gsi indexed array.
  Maintain back mapping from irqchip/pin to gsi.
  Move irq routing data structure to rcu locking
  Move irq ack notifier list to arch independent code.
  Convert irq notifiers lists to RCU locking.
  Move IO APIC to its own lock.
  Drop kvm->irq_lock lock from irq injection path.

 arch/ia64/include/asm/kvm.h      |    1 +
 arch/ia64/include/asm/kvm_host.h |    1 -
 arch/ia64/kvm/kvm-ia64.c         |    9 +--
 arch/x86/include/asm/kvm.h       |    1 +
 arch/x86/include/asm/kvm_host.h  |    2 -
 arch/x86/kvm/i8254.c             |    2 -
 arch/x86/kvm/i8259.c             |   44 +++++----
 arch/x86/kvm/irq.h               |    1 +
 arch/x86/kvm/lapic.c             |    7 +-
 arch/x86/kvm/x86.c               |   12 +--
 include/linux/kvm_host.h         |   20 +++-
 virt/kvm/eventfd.c               |    2 -
 virt/kvm/ioapic.c                |   80 +++++++++++----
 virt/kvm/ioapic.h                |    5 +
 virt/kvm/irq_comm.c              |  212 ++++++++++++++++++++++----------------
 virt/kvm/kvm_main.c              |    4 +-
 16 files changed, 239 insertions(+), 164 deletions(-)

--
To unsubscribe from this list: send the line "unsubscribe kvm" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html

[Index of Archives]     [KVM ARM]     [KVM ia64]     [KVM ppc]     [Virtualization Tools]     [Spice Development]     [Libvirt]     [Libvirt Users]     [Linux USB Devel]     [Linux Audio Users]     [Yosemite Questions]     [Linux Kernel]     [Linux SCSI]     [XFree86]
  Powered by Linux