public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
* [PATCH RFC 0/2] kvm: set irq affinity for assigned devices
@ 2011-10-11 18:38 Michael S. Tsirkin
  2011-10-11 18:38 ` [PATCH RFC 1/2] kvm: pass host irq number to set irq calls Michael S. Tsirkin
  2011-10-11 18:38 ` [PATCH RFC 2/2] kvm: set affinity hint for assigned device msi Michael S. Tsirkin
  0 siblings, 2 replies; 15+ messages in thread
From: Michael S. Tsirkin @ 2011-10-11 18:38 UTC (permalink / raw)
  To: Avi Kivity, Marcelo Tosatti, Thomas Gleixner, Ingo Molnar,
	H. Peter Anvin, x86, kvm, linux-kernel

To forward an interrupt to a vcpu that runs on
a host cpu different from the current one,
we need an ipi which likely will cost us as much
as delivering the interrupt directly to that cpu would.
    
So it seems to make sense to set irq affinity hint to point there, irq
balancer can then take this into accound and balance interrupts
accordingly.

This is what this patchset does.
Note: it might make sense to optimize the gsi lookups
here for the msi case, using rcu, the way we did for eventfd.
But that's a subject for another patch.

Warning: compiled only.

Any early comments / flames?

Thanks,

-- 
MST


Michael S. Tsirkin (2):
  kvm: pass host irq number to set irq calls
  kvm: set affinity hint for assigned device msi

 arch/x86/kvm/i8254.c     |    4 ++--
 arch/x86/kvm/lapic.c     |    2 +-
 arch/x86/kvm/x86.c       |    2 +-
 include/linux/kvm_host.h |    7 ++++---
 virt/kvm/assigned-dev.c  |   17 ++++++++++-------
 virt/kvm/eventfd.c       |    7 ++++---
 virt/kvm/ioapic.c        |    2 +-
 virt/kvm/ioapic.h        |    2 +-
 virt/kvm/irq_comm.c      |   35 +++++++++++++++++++++++++++--------
 9 files changed, 51 insertions(+), 27 deletions(-)

-- 
1.7.5.53.gc233e

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

end of thread, other threads:[~2012-01-15 13:22 UTC | newest]

Thread overview: 15+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2011-10-11 18:38 [PATCH RFC 0/2] kvm: set irq affinity for assigned devices Michael S. Tsirkin
2011-10-11 18:38 ` [PATCH RFC 1/2] kvm: pass host irq number to set irq calls Michael S. Tsirkin
2011-10-11 18:38 ` [PATCH RFC 2/2] kvm: set affinity hint for assigned device msi Michael S. Tsirkin
2011-10-13 14:54   ` Marcelo Tosatti
2011-10-16 13:12     ` Michael S. Tsirkin
2011-10-17 10:58       ` Marcelo Tosatti
2011-10-17 13:32         ` Michael S. Tsirkin
2011-10-17 16:07           ` Marcelo Tosatti
2011-10-17 16:14             ` Michael S. Tsirkin
2011-10-17 17:04             ` Michael S. Tsirkin
2012-01-11 16:10               ` Marcelo Tosatti
2011-10-17 11:09       ` Marcelo Tosatti
2011-10-17 13:35         ` Michael S. Tsirkin
2012-01-12 14:09   ` Avi Kivity
2012-01-15 13:24     ` Michael S. Tsirkin

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