[libvirt] [PATCH 00/13] Memory alignment vs. migration fixes

Peter Krempa pkrempa at redhat.com
Mon Sep 21 17:21:21 UTC 2015


The refactorings that I've done in preparation for memory hotplug had the right
idea in regards to handling of the various memory size fields in libvirt, but
the execution of the refactors was suboptimal for migration compatibilty.

This patchset fixes problems when migrating from older libvirt versions that
allowed specifying a config where contents <memory> were not equal to the total
size of all NUMA nodes. Additionally a few

Patches 01-05/13 are small cleanups to various parts of the code.

Patch 06/13 adds a XML parser flag that will be used later on.

Patches 07-08 do a few more cleanups in the memory parsing code.

Patch 12/13 in this series isn't entirely relevant to this series, but depends
on 09-11/13 so I've included it here. The patch modifies the alignment for PPC
machines that started requiring alignment to 256MiB in some cases. As we now
have a way to keep migrations intact we can switch the alignment always.

Patch 13/13 adds a test case based on an existing test to check that the sizing
code did not regress (again ...).

Peter Krempa (13):
  libxl: vz: Use accessor instead of direct access for max_balloon
  conf: Add helper to determine whether memory hotplug is enabled for a
    vm
  qemu: Make memory alignment helper more universal
  conf: Drop VIR_DOMAIN_DEF_PARSE_CLOCK_ADJUST flag
  conf: Document all VIR_DOMAIN_DEF_PARSE_* flags
  conf: Add XML parser flag that will allow us to do incompatible
    updates
  conf: Split memory related post parse stuff into separate function
  conf: Rename max_balloon to total_memory
  conf: Pre-calculate initial memory size instead of always calculating
    it
  conf: Don't always recalculate initial memory size from NUMA size
    totals
  qemu: command: Align memory sizes only on fresh starts
  qemu: ppc64: Align memory sizes to 256MiB blocks
  test: Add test to validate that memory sizes don't get updated on
    migration

 src/conf/domain_conf.c                             | 113 +++++++++++++++------
 src/conf/domain_conf.h                             |  29 ++++--
 src/hyperv/hyperv_driver.c                         |   2 +-
 src/libvirt_private.syms                           |   2 +
 src/libxl/libxl_driver.c                           |   4 +-
 src/lxc/lxc_driver.c                               |   2 +-
 src/lxc/lxc_native.c                               |   4 +-
 src/phyp/phyp_driver.c                             |   2 +-
 src/qemu/qemu_command.c                            |  12 ++-
 src/qemu/qemu_domain.c                             |  44 +++++---
 src/qemu/qemu_domain.h                             |   3 +-
 src/qemu/qemu_driver.c                             |  14 ++-
 src/qemu/qemu_hotplug.c                            |   4 +-
 src/qemu/qemu_migration.c                          |   8 +-
 src/test/test_driver.c                             |   2 +-
 src/uml/uml_driver.c                               |   2 +-
 src/vbox/vbox_common.c                             |   4 +-
 src/vmx/vmx.c                                      |   2 +-
 src/vz/vz_driver.c                                 |   2 +-
 src/vz/vz_sdk.c                                    |   2 +-
 src/xen/xm_internal.c                              |   2 +-
 src/xenapi/xenapi_driver.c                         |   2 +-
 src/xenconfig/xen_common.c                         |   2 +-
 src/xenconfig/xen_sxpr.c                           |   2 +-
 .../qemuxml2argv-migrate-numa-unaligned.args       |  13 +++
 .../qemuxml2argv-migrate-numa-unaligned.xml        |  33 ++++++
 .../qemuxml2argv-pseries-cpu-compat.args           |   2 +-
 .../qemuxml2argvdata/qemuxml2argv-restore-v1.args  |   2 +-
 tests/qemuxml2argvtest.c                           |  13 ++-
 tests/qemuxml2xmltest.c                            |   3 +-
 30 files changed, 238 insertions(+), 93 deletions(-)
 create mode 100644 tests/qemuxml2argvdata/qemuxml2argv-migrate-numa-unaligned.args
 create mode 100644 tests/qemuxml2argvdata/qemuxml2argv-migrate-numa-unaligned.xml

-- 
2.4.5




More information about the libvir-list mailing list