kvm.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH 00/10] make interrupt injection lockless (almost)
@ 2009-08-09 12:41 Gleb Natapov
  2009-08-09 12:41 ` [PATCH 01/10] Change irq routing table to use gsi indexed array Gleb Natapov
                   ` (9 more replies)
  0 siblings, 10 replies; 27+ messages in thread
From: Gleb Natapov @ 2009-08-09 12:41 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 split kvm->irq_lock mutex to smaller spinlocks each one protects
only one thing. Irq routing, irq notifier lists and ioapic gain their own
spinlock.  Pic is already has its own lock. This patch series also makes
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.
Patch 1 changes irq routing data structure to much more efficient one.
Patch 10 introduce API that allows to send MSI message without going
through irq routing table. This allows us, among other thing, to limit irq
routing table to a small number of entries.

Gleb Natapov (10):
  Change irq routing table to use gsi indexed array.
  Move irq routing data structure to rcu locking
  Move irq ack notifier list to arch independent code.
  Convert irq notifiers lists to RCU locking.
  Protect irq_sources_bitmap by kvm->lock instead of kvm->irq_lock
  Move irq routing to its own locking.
  Move irq notifiers lists to its own locking.
  Move IO APIC to its own lock.
  Drop kvm->irq_lock lock.
  Introduce MSI message sending interface that bypass IRQ routing.

 arch/ia64/include/asm/kvm_host.h |    1 -
 arch/ia64/kvm/kvm-ia64.c         |   55 +++++++++--
 arch/x86/include/asm/kvm_host.h  |    3 +-
 arch/x86/kvm/i8254.c             |    4 +-
 arch/x86/kvm/i8259.c             |    8 +-
 arch/x86/kvm/lapic.c             |    7 +-
 arch/x86/kvm/x86.c               |   58 +++++++++---
 include/linux/kvm.h              |   10 ++-
 include/linux/kvm_host.h         |   21 +++-
 virt/kvm/eventfd.c               |    2 -
 virt/kvm/ioapic.c                |   53 +++++++----
 virt/kvm/ioapic.h                |    4 +-
 virt/kvm/irq_comm.c              |  196 +++++++++++++++++++++----------------
 virt/kvm/kvm_main.c              |   11 +-
 14 files changed, 277 insertions(+), 156 deletions(-)


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

end of thread, other threads:[~2009-08-09 15:16 UTC | newest]

Thread overview: 27+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2009-08-09 12:41 [PATCH 00/10] make interrupt injection lockless (almost) Gleb Natapov
2009-08-09 12:41 ` [PATCH 01/10] Change irq routing table to use gsi indexed array Gleb Natapov
2009-08-09 14:25   ` Avi Kivity
2009-08-09 12:41 ` [PATCH 02/10] Move irq routing data structure to rcu locking Gleb Natapov
2009-08-09 12:41 ` [PATCH 03/10] Move irq ack notifier list to arch independent code Gleb Natapov
2009-08-09 12:41 ` [PATCH 04/10] Convert irq notifiers lists to RCU locking Gleb Natapov
2009-08-09 12:41 ` [PATCH 05/10] Protect irq_sources_bitmap by kvm->lock instead of kvm->irq_lock Gleb Natapov
2009-08-09 12:41 ` [PATCH 06/10] Move irq routing to its own locking Gleb Natapov
2009-08-09 14:52   ` Avi Kivity
2009-08-09 12:41 ` [PATCH 07/10] Move irq notifiers lists " Gleb Natapov
2009-08-09 14:52   ` Avi Kivity
2009-08-09 14:49     ` Gleb Natapov
2009-08-09 14:57       ` Avi Kivity
2009-08-09 12:41 ` [PATCH 08/10] Move IO APIC to its own lock Gleb Natapov
2009-08-09 14:54   ` Avi Kivity
2009-08-09 14:57     ` Gleb Natapov
2009-08-09 15:10       ` Avi Kivity
2009-08-09 15:09         ` Gleb Natapov
2009-08-09 12:41 ` [PATCH 09/10] Drop kvm->irq_lock lock Gleb Natapov
2009-08-09 12:41 ` [PATCH 10/10] Introduce MSI message sending interface that bypass IRQ routing Gleb Natapov
2009-08-09 14:56   ` Avi Kivity
2009-08-09 14:52     ` Gleb Natapov
2009-08-09 15:01       ` Avi Kivity
2009-08-09 15:07         ` Gleb Natapov
2009-08-09 15:14           ` Avi Kivity
2009-08-09 15:14             ` Gleb Natapov
2009-08-09 15:22               ` Avi Kivity

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).