[libvirt] [PATCH v2 00/27] Prepare for specific vcpu hot(un)plug - part 1

Peter Krempa pkrempa at redhat.com
Fri Nov 27 16:12:44 UTC 2015


This series is getting rather big. The target is to refactor the way libvirt
stores info about vCPUs into a single structure (okay, two structures for the
qemu driver. Part 1 is not yet completely there, well, not even halfway.

Future work will involve fully allocating priv->vcpupids to the maxcpus size
and moving around few other bits of data in cputune and other parts to the new
structure. Yet another follow up work is then to add new APIs for vCPU hotplug,
which will enable adding vCPUs sparsely (useful if you have NUMA).

Since this refactor will result in tracking all vcpu-related data in one struct,
the result will automagically fix a few bugs where we'd end up with invalid
config after vcpu unplug or other operations.

Version 2 does not contain already pushed patches and incorporates feedback from
John's review. Since I've changed quite a few things I'm reposting this.

Peter Krempa (27):
  conf: Replace writes to def->maxvcpus with accessor
  conf: Use local copy of maxvcpus in virDomainVcpuParse
  conf: Extract update of vcpu count if maxvcpus is decreased
  conf: Add helper to check whether domain has offline vCPUs
  conf: Replace read access to def->maxvcpus with accessor
  conf: Replace writes to def->vcpus with accessor
  conf: Move vcpu count check into helper
  conf: Replace read accesses to def->vcpus with accessor
  conf: Turn def->maxvcpus into size_t
  qemu: domain: Add helper to access vm->privateData->agent
  qemu: Extract vCPU onlining/offlining via agent into a separate
    function
  qemu: qemuDomainSetVcpusAgent: re-check agent before calling it the
    again
  qemu: Split up vCPU hotplug and hotunplug
  qemu: cpu hotplug: Fix error handling logic
  qemu: monitor: Remove weird return values from qemuMonitorSetCPU
  qemu: cpu hotplug: Move loops to qemuDomainSetVcpusFlags
  qemu: Refactor qemuDomainHotplugVcpus
  qemu: refactor qemuDomainHotunplugVcpus
  conf: turn def->vcpus into a structure
  conf: ABI: Split up and improve vcpu info ABI checking
  conf: Add helper to get pointer to a certain vCPU definition
  qemu: cgroup: Remove now unreachable check
  qemu: Drop checking vcpu threads in emulator bandwidth getter/setter
  qemu: Replace checking for vcpu<->pid mapping availability with a
    helper
  qemu: Add helper to retrieve vCPU pid
  qemu: driver: Refactor qemuDomainHelperGetVcpus
  qemu: cgroup: Don't use priv->ncpupids to iterate domain vCPUs

 src/bhyve/bhyve_command.c    |   2 +-
 src/bhyve/bhyve_driver.c     |   2 +-
 src/conf/domain_audit.c      |   2 +-
 src/conf/domain_conf.c       | 190 ++++++++++++---
 src/conf/domain_conf.h       |  20 +-
 src/hyperv/hyperv_driver.c   |  10 +-
 src/libvirt_private.syms     |   6 +
 src/libxl/libxl_conf.c       |   6 +-
 src/libxl/libxl_driver.c     |  40 ++--
 src/lxc/lxc_controller.c     |   2 +-
 src/lxc/lxc_driver.c         |   2 +-
 src/lxc/lxc_native.c         |   7 +-
 src/openvz/openvz_conf.c     |   7 +-
 src/openvz/openvz_driver.c   |  19 +-
 src/phyp/phyp_driver.c       |  12 +-
 src/qemu/qemu_cgroup.c       |  42 ++--
 src/qemu/qemu_command.c      |  29 ++-
 src/qemu/qemu_domain.c       |  47 ++++
 src/qemu/qemu_domain.h       |   4 +
 src/qemu/qemu_driver.c       | 542 ++++++++++++++++++++++---------------------
 src/qemu/qemu_monitor.c      |   3 +
 src/qemu/qemu_monitor_json.c |   8 -
 src/qemu/qemu_monitor_text.c |  23 +-
 src/qemu/qemu_process.c      |  22 +-
 src/test/test_driver.c       |  38 +--
 src/uml/uml_driver.c         |   2 +-
 src/vbox/vbox_common.c       |  19 +-
 src/vmware/vmware_driver.c   |   2 +-
 src/vmx/vmx.c                |  38 +--
 src/vz/vz_driver.c           |   8 +-
 src/vz/vz_sdk.c              |  13 +-
 src/xen/xm_internal.c        |  19 +-
 src/xenapi/xenapi_driver.c   |   7 +-
 src/xenapi/xenapi_utils.c    |   6 +-
 src/xenconfig/xen_common.c   |  16 +-
 src/xenconfig/xen_sxpr.c     |  27 ++-
 36 files changed, 767 insertions(+), 475 deletions(-)

-- 
2.6.2




More information about the libvir-list mailing list