[pve-devel] [RFC PATCH qemu-server 0/7] Explicit dimm hotplugging

Wolfgang Bumiller w.bumiller at proxmox.com
Tue Dec 20 12:49:19 CET 2016


This series introduces a 'dimms' option to provide explicit dimm
configurations for VMs. This is less abstract than the current way of
setting a single value in that you can (or have to) assign specific
sizes to their desired numa nodes, but still abstract enough so that
you don't have to unplug specific slots. The unplug code will try to
unplug existing dimms as it finds them via qemu_dimm_list() until the
current setup matches the desired one. On error the new setup is left
as a pending change.

The option looks like this:

  dimms: 512 at 0x4;1024X0x4

This adds 4 dimms of 512M and 1G each to numa node 0.
To remove all dimms:

  dimms: none

This is not the same as deleting the dimms option:

When usign this hotplug mode the semantic of the 'memory' option is
changed: Previously we had a fixed static memory and filled up the
rest with dimms. Now the memory option IS the static memory and dimms
are explicit.

Ex. 1:
  memory: 2048
  (no dimms option specified)

Uses the old method of assigning 1024M static memory and adding 2 512M
dimms.


Ex. 2:
  memory: 2048
  dimms: none

Uses the new method: 2G static memory, no extra dimms.


Ex. 3:

  memory: 1024
  dimms: 512 at 0x2

Results in the same setup as ex. 1 would (provided sockets=1).

Note: the last patch in the series is *optional* and is there for
convenience. It allows switching a running VM from the old hotplug
method to the new one by issuing the following command:

  # qm set 100 -dimms current

With this command a running VM with example config 1 from above would
be turned into example config 3 (both `memory` and `dimms` options
would be modified).


See the patch 6 for the necessary migration changes.


Wolfgang Bumiller (7):
  memory: cleanup
  memory: simplify qemu_dimm_list
  memory: fix implicit host numa map return type
  memory: factor out dimm adding for later reuse
  memory: explicit dimm configuration
  migration, memory: explicit dimm configuration
  memory: 'current' value for dimms

 PVE/API2/Qemu.pm         |  14 +-
 PVE/QemuMigrate.pm       |  20 ++-
 PVE/QemuServer.pm        |  32 +++-
 PVE/QemuServer/Memory.pm | 403 +++++++++++++++++++++++++++++++++++++++--------
 4 files changed, 393 insertions(+), 76 deletions(-)

-- 
2.1.4





More information about the pve-devel mailing list