public inbox for kvm@vger.kernel.org
 help / color / mirror / Atom feed
* [PATCH 0/5][RFC] more fine grained locking for IRQ injection
@ 2009-07-13  9:12 Gleb Natapov
  2009-07-13  9:12 ` [PATCH 1/5] Protect irq_sources_bitmap by kvm->lock instead of kvm->irq_lock Gleb Natapov
                   ` (5 more replies)
  0 siblings, 6 replies; 34+ messages in thread
From: Gleb Natapov @ 2009-07-13  9:12 UTC (permalink / raw)
  To: kvm; +Cc: avi, mtosatti

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 logic use more fine grained locking. 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 uses 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.

The patch series is on top of my previous series that converts ack notifiers
to the RCU locking.

Gleb Natapov (5):
  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.

 arch/ia64/kvm/kvm-ia64.c |   29 +++++++++++++++++++--------
 arch/x86/kvm/i8254.c     |    4 +-
 arch/x86/kvm/lapic.c     |    7 +-----
 arch/x86/kvm/x86.c       |   32 +++++++++++++++++++-----------
 include/linux/kvm_host.h |    3 +-
 virt/kvm/eventfd.c       |    2 -
 virt/kvm/ioapic.c        |   47 +++++++++++++++++++++++++++------------------
 virt/kvm/ioapic.h        |    1 +
 virt/kvm/irq_comm.c      |   35 ++++++++++++++-------------------
 virt/kvm/kvm_main.c      |    7 ++---
 10 files changed, 92 insertions(+), 75 deletions(-)


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

end of thread, other threads:[~2009-07-13 16:44 UTC | newest]

Thread overview: 34+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2009-07-13  9:12 [PATCH 0/5][RFC] more fine grained locking for IRQ injection Gleb Natapov
2009-07-13  9:12 ` [PATCH 1/5] Protect irq_sources_bitmap by kvm->lock instead of kvm->irq_lock Gleb Natapov
2009-07-13 14:29   ` Gregory Haskins
2009-07-13 14:39     ` Gleb Natapov
2009-07-13 14:55       ` Michael S. Tsirkin
2009-07-13 15:01         ` Gleb Natapov
2009-07-13 15:03       ` Gregory Haskins
2009-07-13 15:11         ` Gregory Haskins
2009-07-13 15:19         ` Gleb Natapov
2009-07-13  9:12 ` [PATCH 2/5] Move irq routing to its own locking Gleb Natapov
2009-07-13  9:12 ` [PATCH 3/5] Move irq notifiers lists " Gleb Natapov
2009-07-13 11:45   ` Michael S. Tsirkin
2009-07-13 11:48     ` Gleb Natapov
2009-07-13 14:23       ` Michael S. Tsirkin
2009-07-13 14:37         ` Gleb Natapov
2009-07-13 14:49           ` Michael S. Tsirkin
2009-07-13 15:23             ` Gleb Natapov
2009-07-13 15:32               ` Gregory Haskins
2009-07-13 15:40               ` Michael S. Tsirkin
2009-07-13 16:28                 ` Gleb Natapov
2009-07-13 16:23           ` Marcelo Tosatti
2009-07-13 16:31             ` Marcelo Tosatti
2009-07-13 16:35               ` Gleb Natapov
2009-07-13 16:43                 ` Marcelo Tosatti
2009-07-13  9:12 ` [PATCH 4/5] Move IO APIC to its own lock Gleb Natapov
2009-07-13  9:12 ` [PATCH 5/5] Drop kvm->irq_lock lock Gleb Natapov
2009-07-13 13:23 ` [PATCH 0/5][RFC] more fine grained locking for IRQ injection Michael S. Tsirkin
2009-07-13 13:28   ` Gleb Natapov
2009-07-13 13:53     ` Michael S. Tsirkin
2009-07-13 13:58       ` Gleb Natapov
2009-07-13 14:21         ` Michael S. Tsirkin
2009-07-13 14:33           ` Gleb Natapov
2009-07-13 14:43             ` Michael S. Tsirkin
2009-07-13 15:21               ` Gleb Natapov

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox