All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH 0/5] KVM: Turn the vcpu array into an xarray
@ 2021-11-05 19:20 ` Marc Zyngier
  0 siblings, 0 replies; 72+ messages in thread
From: Marc Zyngier @ 2021-11-05 19:20 UTC (permalink / raw)
  To: kvm, linux-mips, kvmarm, linuxppc-dev
  Cc: Juergen Gross, Huacai Chen, Janosch Frank, Christian Borntraeger,
	Anup Patel, David Hildenbrand, Nicholas Piggin, Atish Patra,
	Aleksandar Markovic, Paul Mackerras, Michael Ellerman,
	Paolo Bonzini, kernel-team, Claudio Imbrenda

The kvm structure is pretty large. A large portion of it is the vcpu
array, which is 4kB on x86_64 and arm64 as they deal with 512 vcpu
VMs. Of course, hardly anyone runs VMs this big, so this is often a
net waste of memory and cache locality.

A possible approach is to turn the fixed-size array into an xarray,
which results in a net code deletion after a bit of cleanup.

This series is on top of the current linux/master as it touches the
RISC-V implementation. Only tested on arm64.

Marc Zyngier (5):
  KVM: Move wiping of the kvm->vcpus array to common code
  KVM: mips: Use kvm_get_vcpu() instead of open-coded access
  KVM: s390: Use kvm_get_vcpu() instead of open-coded access
  KVM: x86: Use kvm_get_vcpu() instead of open-coded access
  KVM: Convert the kvm->vcpus array to a xarray

 arch/arm64/kvm/arm.c           | 10 +---------
 arch/mips/kvm/loongson_ipi.c   |  4 ++--
 arch/mips/kvm/mips.c           | 23 ++---------------------
 arch/powerpc/kvm/powerpc.c     | 10 +---------
 arch/riscv/kvm/vm.c            | 10 +---------
 arch/s390/kvm/kvm-s390.c       | 26 ++++++--------------------
 arch/x86/kvm/vmx/posted_intr.c |  2 +-
 arch/x86/kvm/x86.c             |  9 +--------
 include/linux/kvm_host.h       |  7 ++++---
 virt/kvm/kvm_main.c            | 33 ++++++++++++++++++++++++++-------
 10 files changed, 45 insertions(+), 89 deletions(-)

-- 
2.30.2

_______________________________________________
kvmarm mailing list
kvmarm@lists.cs.columbia.edu
https://lists.cs.columbia.edu/mailman/listinfo/kvmarm

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

end of thread, other threads:[~2021-11-16 16:49 UTC | newest]

Thread overview: 72+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2021-11-05 19:20 [PATCH 0/5] KVM: Turn the vcpu array into an xarray Marc Zyngier
2021-11-05 19:20 ` Marc Zyngier
2021-11-05 19:20 ` Marc Zyngier
2021-11-05 19:20 ` [PATCH 1/5] KVM: Move wiping of the kvm->vcpus array to common code Marc Zyngier
2021-11-05 19:20   ` Marc Zyngier
2021-11-05 19:20   ` Marc Zyngier
2021-11-05 20:12   ` Sean Christopherson
2021-11-05 20:12     ` Sean Christopherson
2021-11-05 20:12     ` Sean Christopherson
2021-11-06 11:17     ` Marc Zyngier
2021-11-06 11:17       ` Marc Zyngier
2021-11-06 11:17       ` Marc Zyngier
2021-11-16 13:49       ` Paolo Bonzini
2021-11-16 13:49         ` Paolo Bonzini
2021-11-16 13:49         ` Paolo Bonzini
2021-11-08 12:12   ` Claudio Imbrenda
2021-11-08 12:12     ` Claudio Imbrenda
2021-11-08 12:12     ` Claudio Imbrenda
2021-11-05 19:20 ` [PATCH 2/5] KVM: mips: Use kvm_get_vcpu() instead of open-coded access Marc Zyngier
2021-11-05 19:20   ` Marc Zyngier
2021-11-05 19:20   ` Marc Zyngier
2021-11-06 15:56   ` Philippe Mathieu-Daudé
2021-11-06 15:56     ` Philippe Mathieu-Daudé
2021-11-06 15:56     ` Philippe Mathieu-Daudé
2021-11-05 19:20 ` [PATCH 3/5] KVM: s390: " Marc Zyngier
2021-11-05 19:20   ` Marc Zyngier
2021-11-05 19:20   ` Marc Zyngier
2021-11-08 12:13   ` Claudio Imbrenda
2021-11-08 12:13     ` Claudio Imbrenda
2021-11-08 12:13     ` Claudio Imbrenda
2021-11-05 19:21 ` [PATCH 4/5] KVM: x86: " Marc Zyngier
2021-11-05 19:21   ` Marc Zyngier
2021-11-05 19:21   ` Marc Zyngier
2021-11-05 20:03   ` Sean Christopherson
2021-11-05 20:03     ` Sean Christopherson
2021-11-05 20:03     ` Sean Christopherson
2021-11-16 14:04     ` Paolo Bonzini
2021-11-16 14:04       ` Paolo Bonzini
2021-11-16 14:04       ` Paolo Bonzini
2021-11-16 16:07       ` Sean Christopherson
2021-11-16 16:07         ` Sean Christopherson
2021-11-16 16:07         ` Sean Christopherson
2021-11-16 16:48         ` Paolo Bonzini
2021-11-16 16:48           ` Paolo Bonzini
2021-11-16 16:48           ` Paolo Bonzini
2021-11-05 19:21 ` [PATCH 5/5] KVM: Convert the kvm->vcpus array to a xarray Marc Zyngier
2021-11-05 19:21   ` Marc Zyngier
2021-11-05 19:21   ` Marc Zyngier
2021-11-05 20:21   ` Sean Christopherson
2021-11-05 20:21     ` Sean Christopherson
2021-11-05 20:21     ` Sean Christopherson
2021-11-06 11:48     ` Marc Zyngier
2021-11-06 11:48       ` Marc Zyngier
2021-11-06 11:48       ` Marc Zyngier
2021-11-08  8:23       ` Marc Zyngier
2021-11-08  8:23         ` Marc Zyngier
2021-11-08  8:23         ` Marc Zyngier
2021-11-16 14:13 ` [PATCH 0/5] KVM: Turn the vcpu array into an xarray Juergen Gross
2021-11-16 14:13   ` Juergen Gross
2021-11-16 14:13   ` Juergen Gross
2021-11-16 14:21   ` Paolo Bonzini
2021-11-16 14:21     ` Paolo Bonzini
2021-11-16 14:21     ` Paolo Bonzini
2021-11-16 14:54     ` Juergen Gross
2021-11-16 14:54       ` Juergen Gross
2021-11-16 14:54       ` Juergen Gross
2021-11-16 15:03 ` Paolo Bonzini
2021-11-16 15:03   ` Paolo Bonzini
2021-11-16 15:03   ` Paolo Bonzini
2021-11-16 15:40   ` Marc Zyngier
2021-11-16 15:40     ` Marc Zyngier
2021-11-16 15:40     ` Marc Zyngier

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.