qemu-devel.nongnu.org archive mirror
 help / color / mirror / Atom feed
* [for-5.0 PATCH v2 0/4] spapr: Use less XIVE HW resources in KVM
@ 2019-11-26 16:46 Greg Kurz
  2019-11-26 16:46 ` [for-5.0 PATCH v2 1/4] linux-headers: Update Greg Kurz
                   ` (4 more replies)
  0 siblings, 5 replies; 9+ messages in thread
From: Greg Kurz @ 2019-11-26 16:46 UTC (permalink / raw)
  To: David Gibson; +Cc: qemu-ppc, Cédric Le Goater, qemu-devel

On POWER9 systems, the XICS-on-XIVE and XIVE KVM devices currently
allocate a bunch of VPs in the XIVE HW to accomodate the highest
VCPU id that may be possibly used in a VM. This limits the number
of VMs that can run with an in-kernel interrupt controller to 63
per POWER9 chip, irrespectively of its number of HW threads, eg.
up to 96 on a POWER9 Nimbus socket. This is an unfortunate waste
of scarce HW resources since a typical VM doesn't need that much
VPs to run.

This series exploits new attributes of the XICS-on-XIVE and XIVE
KVM devices that allow userspace to tune the numbers of VPs it
really needs. Support for this attributes has just reached linux
mainline.

In combination with recent commit 29cb4187497d "spapr: Set VSMT to
smp_threads by default" which makes VCPU ids contiguous, it is
possible to start more than 200 VMs instead of 127 on an AC922
system (two sockets, 144 HW threads).

Changes in v2:
- add an nr_servers argument to the activate() handler instead of
  a QOM property for XIVE and a XICSFabric method for XICS-on-XIVE.
- even if the last two patches haven't changed much, the code base
  itself has, so I've deliberately dropped Cedric's R-b tags

--
Greg

---

Greg Kurz (4):
      linux-headers: Update
      spapr: Pass the maximum number of vCPUs to the KVM interrupt controller
      spapr/xics: Configure number of servers in KVM
      spapr/xive: Configure number of servers in KVM


 hw/intc/spapr_xive.c                         |    6 ++++--
 hw/intc/spapr_xive_kvm.c                     |   26 +++++++++++++++++++++++---
 hw/intc/xics_kvm.c                           |   24 +++++++++++++++++++++---
 hw/intc/xics_spapr.c                         |    5 +++--
 hw/ppc/spapr_irq.c                           |    8 +++++---
 include/hw/ppc/spapr_irq.h                   |   10 ++++++++--
 include/hw/ppc/spapr_xive.h                  |    3 ++-
 include/hw/ppc/xics_spapr.h                  |    3 ++-
 include/standard-headers/linux/ethtool.h     |    6 ++++++
 include/standard-headers/linux/virtio_ring.h |    2 +-
 linux-headers/asm-arm/kvm.h                  |    3 ++-
 linux-headers/asm-arm64/kvm.h                |    5 ++++-
 linux-headers/asm-mips/unistd_n32.h          |    1 +
 linux-headers/asm-mips/unistd_n64.h          |    1 +
 linux-headers/asm-mips/unistd_o32.h          |    1 +
 linux-headers/asm-powerpc/kvm.h              |    3 +++
 linux-headers/linux/kvm.h                    |   11 +++++++++++
 linux-headers/linux/psp-sev.h                |    3 +++
 18 files changed, 101 insertions(+), 20 deletions(-)



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

end of thread, other threads:[~2019-11-27  6:04 UTC | newest]

Thread overview: 9+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2019-11-26 16:46 [for-5.0 PATCH v2 0/4] spapr: Use less XIVE HW resources in KVM Greg Kurz
2019-11-26 16:46 ` [for-5.0 PATCH v2 1/4] linux-headers: Update Greg Kurz
2019-11-26 16:46 ` [for-5.0 PATCH v2 2/4] spapr: Pass the maximum number of vCPUs to the KVM interrupt controller Greg Kurz
2019-11-26 17:01   ` Cédric Le Goater
2019-11-26 16:46 ` [for-5.0 PATCH v2 3/4] spapr/xics: Configure number of servers in KVM Greg Kurz
2019-11-26 17:02   ` Cédric Le Goater
2019-11-26 16:46 ` [for-5.0 PATCH v2 4/4] spapr/xive: " Greg Kurz
2019-11-26 17:02   ` Cédric Le Goater
2019-11-27  5:41 ` [for-5.0 PATCH v2 0/4] spapr: Use less XIVE HW resources " David Gibson

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