[libvirt] [RFC PATCH 00/12] Add support for memory hotplug

Peter Krempa pkrempa at redhat.com
Fri Jan 30 13:20:57 UTC 2015


!! this series applies on top of the cleanup series posted earlier !!

Hi,
this is my try to implement memory hotplug in libvirt (for the qemu) driver.
This series is almost code-complete but is lacking tests and docs as I wanted
to agree on design first before attempting to write the documentation.

Additionally this series is also lacking code that would fix memballoon
handling but I'm waiting on a clousure how it's supposed to work from qemu's
side as it appears to be broken there too.

The basic XML used to add a memory device:
    <memory model='acpi-dimm'>
      <target>
        <size unit='KiB'>524287</size>
        <node>0</node>
      </target>
    </memory>

The <target> subelement is mandatory, whereas the <source> subelement (that
contains source numa nodes, source page size ) is optional and is inferred
from the NUMA tuning for given target numa node.

Please note that at least one guest numa node has to be configured for the
guest for this to work (limitation of qemu).

What's missing in this series:
    - tests
    - docs
    - commit message touch-up
    - code to audit the memory size changes
    - code to make memory balloning working with correct size

Peter Krempa (12):
  qemu: caps: Add capability bit for the "pc-dimm" device
  conf: Add support for parsing and formatting max memory and slot count
  qemu: Implement setup of memory hotplug parameters
  conf: Add device address type for dimm devices
  conf: Add interface to parse and format memory device information
  qemu: memdev: Add infrastructure to load memory device information
  qemu: migration: Forbid migration with memory modules lacking info
  qemu: add support for memory devices
  conf: Introduce helper to find duplicate device address
  qemu: conf: Add support for memory device cold(un)plug
  qemu: Implement memory device hotplug
  qemu: Implement memory device hotunplug

 docs/formatdomain.html.in                          |  19 +
 docs/schemas/domaincommon.rng                      |  76 +++
 src/bhyve/bhyve_domain.c                           |   9 +-
 src/conf/domain_conf.c                             | 655 ++++++++++++++++++++-
 src/conf/domain_conf.h                             |  63 ++
 src/libvirt_private.syms                           |   7 +
 src/libxl/libxl_domain.c                           |   8 +
 src/lxc/lxc_domain.c                               |   8 +
 src/openvz/openvz_driver.c                         |  14 +-
 src/parallels/parallels_driver.c                   |   6 +-
 src/phyp/phyp_driver.c                             |   6 +-
 src/qemu/qemu_capabilities.c                       |   2 +
 src/qemu/qemu_capabilities.h                       |   1 +
 src/qemu/qemu_command.c                            | 157 ++++-
 src/qemu/qemu_command.h                            |  15 +
 src/qemu/qemu_domain.c                             |  58 ++
 src/qemu/qemu_domain.h                             |   6 +
 src/qemu/qemu_driver.c                             |  29 +
 src/qemu/qemu_hotplug.c                            | 178 ++++++
 src/qemu/qemu_hotplug.h                            |   6 +
 src/qemu/qemu_migration.c                          |  14 +
 src/qemu/qemu_monitor.c                            |  45 ++
 src/qemu/qemu_monitor.h                            |  14 +
 src/qemu/qemu_monitor_json.c                       | 116 ++++
 src/qemu/qemu_monitor_json.h                       |   5 +
 src/qemu/qemu_process.c                            |   4 +
 src/uml/uml_driver.c                               |   9 +-
 src/vbox/vbox_common.c                             |   6 +-
 src/vmware/vmware_driver.c                         |   6 +-
 src/vmx/vmx.c                                      |   6 +-
 src/xen/xen_driver.c                               |   7 +
 src/xenapi/xenapi_driver.c                         |   9 +-
 tests/domainschemadata/maxMemory.xml               |  19 +
 tests/qemucapabilitiesdata/caps_2.1.1-1.caps       |   1 +
 .../qemuxml2argv-memory-hotplug-dimm.xml           |  47 ++
 .../qemuxml2argv-memory-hotplug-nonuma.xml         |  22 +
 .../qemuxml2argv-memory-hotplug.args               |   6 +
 .../qemuxml2argv-memory-hotplug.xml                |  34 ++
 tests/qemuxml2argvtest.c                           |   4 +
 tests/qemuxml2xmltest.c                            |   4 +
 40 files changed, 1682 insertions(+), 19 deletions(-)
 create mode 100644 tests/domainschemadata/maxMemory.xml
 create mode 100644 tests/qemuxml2argvdata/qemuxml2argv-memory-hotplug-dimm.xml
 create mode 100644 tests/qemuxml2argvdata/qemuxml2argv-memory-hotplug-nonuma.xml
 create mode 100644 tests/qemuxml2argvdata/qemuxml2argv-memory-hotplug.args
 create mode 100644 tests/qemuxml2argvdata/qemuxml2argv-memory-hotplug.xml

-- 
2.2.2




More information about the libvir-list mailing list