kvm.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH 0/8 v2] make interrupt injection lockless (almost)
@ 2009-08-11 12:31 Gleb Natapov
  2009-08-11 12:31 ` [PATCH 1/8 v2] Change irq routing table to use gsi indexed array Gleb Natapov
                   ` (7 more replies)
  0 siblings, 8 replies; 28+ messages in thread
From: Gleb Natapov @ 2009-08-11 12:31 UTC (permalink / raw)
  To: avi; +Cc: kvm

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 1/2 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.

Gleb Natapov (8):
  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.
  Change irq_lock from mutex to spinlock.

 arch/ia64/include/asm/kvm_host.h |    1 -
 arch/ia64/kvm/kvm-ia64.c         |   29 +++++--
 arch/x86/include/asm/kvm_host.h  |    1 -
 arch/x86/kvm/i8254.c             |    2 -
 arch/x86/kvm/i8259.c             |    4 +
 arch/x86/kvm/lapic.c             |    7 +--
 arch/x86/kvm/x86.c               |   32 +++++---
 include/linux/kvm_host.h         |   20 ++++-
 virt/kvm/eventfd.c               |    2 -
 virt/kvm/ioapic.c                |   49 ++++++++-----
 virt/kvm/ioapic.h                |    1 +
 virt/kvm/irq_comm.c              |  150 ++++++++++++++++++++------------------
 virt/kvm/kvm_main.c              |    6 +-
 13 files changed, 173 insertions(+), 131 deletions(-)


^ permalink raw reply	[flat|nested] 28+ messages in thread

end of thread, other threads:[~2009-08-12 10:19 UTC | newest]

Thread overview: 28+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2009-08-11 12:31 [PATCH 0/8 v2] make interrupt injection lockless (almost) Gleb Natapov
2009-08-11 12:31 ` [PATCH 1/8 v2] Change irq routing table to use gsi indexed array Gleb Natapov
2009-08-12  8:05   ` Avi Kivity
2009-08-12  8:41     ` Gleb Natapov
2009-08-12  9:06       ` Avi Kivity
2009-08-11 12:31 ` [PATCH 2/8 v2] Maintain back mapping from irqchip/pin to gsi Gleb Natapov
2009-08-12  8:09   ` Avi Kivity
2009-08-12  8:42     ` Gleb Natapov
2009-08-12  9:06       ` Avi Kivity
2009-08-12 10:17         ` Gleb Natapov
2009-08-12 10:19           ` Avi Kivity
2009-08-11 12:31 ` [PATCH 3/8 v2] Move irq routing data structure to rcu locking Gleb Natapov
2009-08-11 12:31 ` [PATCH 4/8 v2] Move irq ack notifier list to arch independent code Gleb Natapov
2009-08-11 12:31 ` [PATCH 5/8 v2] Convert irq notifiers lists to RCU locking Gleb Natapov
2009-08-11 12:31 ` [PATCH 6/8 v2] Move IO APIC to its own lock Gleb Natapov
2009-08-12  8:27   ` Avi Kivity
2009-08-12  9:04     ` Gleb Natapov
2009-08-12  9:18       ` Avi Kivity
2009-08-12  9:47         ` Gleb Natapov
2009-08-12  9:57           ` Avi Kivity
2009-08-12 10:05             ` Gleb Natapov
2009-08-12 10:07               ` Avi Kivity
2009-08-11 12:31 ` [PATCH 7/8 v2] Drop kvm->irq_lock lock from irq injection path Gleb Natapov
2009-08-11 12:31 ` [PATCH 8/8 v2] Change irq_lock from mutex to spinlock Gleb Natapov
2009-08-12  8:29   ` Avi Kivity
2009-08-12  9:11     ` Gleb Natapov
2009-08-12  9:22       ` Avi Kivity
2009-08-12  9:47         ` Gleb Natapov

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).