[libvirt] [PATCH v2 00/16] Support for per-guest-node binding

Michal Privoznik mprivozn at redhat.com
Fri Jul 11 15:10:48 UTC 2014


On 08.07.2014 13:50, Martin Kletzander wrote:
> Currently we are only able to bind the whole domain to some host nodes
> using the /domain/numatune/memory element.  Numerous requests were
> made to support host<->guest numa node bindings, so this series tries
> to implement that using /domain/numatune/memnode elements.
>
> That is incompatible with automatic numa placement (numad) since that
> makes no sense.
>
> Some of these patches were ACK'd in the previous round, but this
> version completely rewrites the parsing and formatting of the numatune
> XML element and places it into a separate file.  Hence the repost of
> all the patches even with those ACK'd ones.
>
> Patches 1-3 move some code around, patch 4 adds cell id specification
> into the XML (which is used later on).  Then patches 5-7 rework the
> numatune handling, which clears out some odd things, but mostly cleans
> the parsing code.  Patch 8 adds the support for memnode elements in
> the XML conf code and together with patch 9 enables the use of it
> outside numatune_conf.c.  After that, I needed to probe qemu for 2
> capabilities; for one of them patch 10 adds the possibility to probe
> for it, then two following patches 11 and 12 add the probing data.
> One of the capabilities tells us that we can use disjoint ranges (not
> necessarily for the cpus= param) with qemu, so patch 13 makes a use of
> it.  Finally patch 14 uses the memnode data to tell qemu which host
> nodes should be used for the allocations of memory blocks.  Patch 15
> does almost nothing, but the next patch looks better with it.  And the
> last patch, number 16, fixes a bug with KVM and cgroups.
>
> One last note, APIs for handling the memnode settings will be added
> later.  I'm sending this to prepare the ground for Michal's work with
> hugepages.
>
>
> Martin Kletzander (16):
>    qemu: purely a code movement
>    qemu: remove useless error check
>    conf: purely a code movement
>    conf, schema: add 'id' field for cells
>    numatune: create new module for numatune
>    numatune: unify numatune struct and enum names
>    numatune: Encapsulate numatune configuration in order to unify results
>    conf, schema: add support for memnode elements
>    numatune: add support for per-node memory bindings in private APIs
>    qemu: allow qmp probing for cmdline options without params
>    qemu: memory-backend-ram capability probing
>    qemu: newer -numa parameter capability probing
>    qemu: enable disjoint numa cpu ranges
>    qemu: pass numa node binding preferences to qemu
>    qemu: split out cpuset.mems setting
>    qemu: leave restricting cpuset.mems after initialization
>
>   docs/formatdomain.html.in                          |  26 +-
>   docs/schemas/domaincommon.rng                      |  22 +
>   po/POTFILES.in                                     |   1 +
>   src/Makefile.am                                    |   3 +-
>   src/conf/cpu_conf.c                                |  39 +-
>   src/conf/cpu_conf.h                                |   3 +-
>   src/conf/domain_conf.c                             | 203 ++-----
>   src/conf/domain_conf.h                             |  10 +-
>   src/conf/numatune_conf.c                           | 589 +++++++++++++++++++++
>   src/conf/numatune_conf.h                           | 108 ++++
>   src/libvirt_private.syms                           |  24 +-
>   src/lxc/lxc_cgroup.c                               |  20 +-
>   src/lxc/lxc_controller.c                           |   5 +-
>   src/lxc/lxc_native.c                               |  15 +-
>   src/parallels/parallels_driver.c                   |   7 +-
>   src/qemu/qemu_capabilities.c                       |  16 +-
>   src/qemu/qemu_capabilities.h                       |   2 +
>   src/qemu/qemu_cgroup.c                             |  52 +-
>   src/qemu/qemu_cgroup.h                             |   4 +-
>   src/qemu/qemu_command.c                            |  98 +++-
>   src/qemu/qemu_driver.c                             |  84 ++-
>   src/qemu/qemu_monitor.c                            |   6 +-
>   src/qemu/qemu_monitor.h                            |   3 +-
>   src/qemu/qemu_monitor_json.c                       |   8 +-
>   src/qemu/qemu_monitor_json.h                       |   3 +-
>   src/qemu/qemu_process.c                            |  12 +-
>   src/util/virnuma.c                                 |  61 +--
>   src/util/virnuma.h                                 |  28 +-
>   tests/qemucapabilitiesdata/caps_1.6.50-1.caps      |   1 +
>   tests/qemucapabilitiesdata/caps_1.6.50-1.replies   |   5 +
>   tests/qemumonitorjsontest.c                        |  20 +-
>   .../qemuxml2argv-cpu-numa-disjoint.args            |   6 +
>   .../qemuxml2argv-cpu-numa-disjoint.xml             |  28 +
>   tests/qemuxml2argvdata/qemuxml2argv-cpu-numa1.xml  |   6 +-
>   tests/qemuxml2argvdata/qemuxml2argv-cpu-numa2.xml  |   6 +-
>   tests/qemuxml2argvdata/qemuxml2argv-cpu-numa3.xml  |  25 +
>   .../qemuxml2argv-numatune-auto-prefer.xml          |  29 +
>   .../qemuxml2argv-numatune-memnode-no-memory.args   |   8 +
>   .../qemuxml2argv-numatune-memnode-no-memory.xml    |  30 ++
>   .../qemuxml2argv-numatune-memnode-nocpu.xml        |  25 +
>   .../qemuxml2argv-numatune-memnode.args             |  11 +
>   .../qemuxml2argv-numatune-memnode.xml              |  33 ++
>   .../qemuxml2argv-numatune-memnodes-problematic.xml |  31 ++
>   tests/qemuxml2argvtest.c                           |  12 +
>   .../qemuxml2xmlout-cpu-numa1.xml                   |  28 +
>   .../qemuxml2xmlout-cpu-numa2.xml                   |  28 +
>   .../qemuxml2xmlout-numatune-auto-prefer.xml        |  29 +
>   .../qemuxml2xmlout-numatune-memnode.xml            |  33 ++
>   tests/qemuxml2xmltest.c                            |   8 +
>   49 files changed, 1467 insertions(+), 387 deletions(-)
>   create mode 100644 src/conf/numatune_conf.c
>   create mode 100644 src/conf/numatune_conf.h
>   create mode 100644 tests/qemuxml2argvdata/qemuxml2argv-cpu-numa-disjoint.args
>   create mode 100644 tests/qemuxml2argvdata/qemuxml2argv-cpu-numa-disjoint.xml
>   create mode 100644 tests/qemuxml2argvdata/qemuxml2argv-cpu-numa3.xml
>   create mode 100644 tests/qemuxml2argvdata/qemuxml2argv-numatune-auto-prefer.xml
>   create mode 100644 tests/qemuxml2argvdata/qemuxml2argv-numatune-memnode-no-memory.args
>   create mode 100644 tests/qemuxml2argvdata/qemuxml2argv-numatune-memnode-no-memory.xml
>   create mode 100644 tests/qemuxml2argvdata/qemuxml2argv-numatune-memnode-nocpu.xml
>   create mode 100644 tests/qemuxml2argvdata/qemuxml2argv-numatune-memnode.args
>   create mode 100644 tests/qemuxml2argvdata/qemuxml2argv-numatune-memnode.xml
>   create mode 100644 tests/qemuxml2argvdata/qemuxml2argv-numatune-memnodes-problematic.xml
>   create mode 100644 tests/qemuxml2xmloutdata/qemuxml2xmlout-cpu-numa1.xml
>   create mode 100644 tests/qemuxml2xmloutdata/qemuxml2xmlout-cpu-numa2.xml
>   create mode 100644 tests/qemuxml2xmloutdata/qemuxml2xmlout-numatune-auto-prefer.xml
>   create mode 100644 tests/qemuxml2xmloutdata/qemuxml2xmlout-numatune-memnode.xml
>
> --
> 2.0.0
>
> --
> libvir-list mailing list
> libvir-list at redhat.com
> https://www.redhat.com/mailman/listinfo/libvir-list
>


ACK to all the patches but 8/16 and 14/16. But please, pretty please 
read my comments to all the patches. Moreover, I rather have an explicit 
second ACK on the XML schema (patches 4/16 and 8/16).

Michal




More information about the libvir-list mailing list