[PATCH 0/5] NUMA CPUs 'auto-fill' for incomplete topologies

Daniel Henrique Barboza danielhb413 at gmail.com
Mon Jun 8 13:50:07 UTC 2020


Ping

On 6/1/20 2:50 PM, Daniel Henrique Barboza wrote:
> Hi,
> 
> This series implements a convenience feature for the case where
> the user defines an incomplete NUMA topology in the domain,
> when the sum of all cpus in each NUMA cell is less than the
> maximum vcpus count of the domain.
> 
> This is an implementation based on Peter Krempa's suggestion in [1].
> The documentation patch (04), aside from documentating this new
> behavior, while also letting the user know that using incomplete
> NUMA topologies are not advised.
> 
> This feature does not break migration ABI. I tested it in a migration
> using an incomplete NUMA topology domain to migrate to another host
> with a patched Libvirt. A guest with this NUMA topology, declaring
> 9 vcpus and short of 7 vcpus to complete the total of 16:
> 
>    <vcpu placement='auto'>16</vcpu>
> [...]
>    <cpu mode='custom' match='exact' check='none'>
>      <model fallback='forbid'>POWER9</model>
>      <numa>
>        <cell id='0' cpus='0-1,6' memory='3906250' unit='KiB'/>
>        <cell id='1' cpus='2-4' memory='3906250' unit='KiB'/>
>        <cell id='2' cpus='10,12' memory='3906250' unit='KiB'/>
>        <cell id='3' cpus='14' memory='3906250' unit='KiB'/>
>      </numa>
>    </cpu>
> 
> Successfully migrates to a patched Libvirt, ending up with
> this topology where the missing VCPUs were added to node 0:
> 
>    <vcpu placement='auto'>16</vcpu>
> [...]
>    <cpu mode='custom' match='exact' check='none'>
>      <model fallback='forbid'>POWER9</model>
>      <numa>
>        <cell id='0' cpus='0-1,5-9,11,13,15' memory='3932160' unit='KiB'/>
>        <cell id='1' cpus='2-4' memory='3932160' unit='KiB'/>
>        <cell id='2' cpus='10,12' memory='3932160' unit='KiB'/>
>        <cell id='3' cpus='14' memory='3932160' unit='KiB'/>
>      </numa>
>    </cpu>
> 
> 
> [1] https://www.redhat.com/archives/libvir-list/2019-June/msg00263.html
> 
> Daniel Henrique Barboza (5):
>    numa_conf.c: add helper functions for cpumap operations
>    qemu_domain.c: NUMA CPUs auto-fill for incomplete topologies
>    qemuxml2xmltest.c: add NUMA vcpus auto fill tests
>    formatdomain.html.in: document the NUMA cpus auto fill feature
>    qemu_validate.c: revert NUMA CPU range user warning
> 
>   docs/formatdomain.html.in                     | 11 ++++-
>   src/conf/numa_conf.c                          | 46 ++++++++++++++++++
>   src/conf/numa_conf.h                          |  3 ++
>   src/libvirt_private.syms                      |  1 +
>   src/qemu/qemu_domain.c                        | 47 +++++++++++++++++++
>   src/qemu/qemu_domain.h                        |  4 ++
>   src/qemu/qemu_driver.c                        |  9 ++++
>   src/qemu/qemu_validate.c                      | 19 ++------
>   .../numavcpus-topology-mismatch.xml           | 37 +++++++++++++++
>   ...avcpus-topology-mismatch.x86_64-latest.xml | 38 +++++++++++++++
>   tests/qemuxml2xmltest.c                       |  1 +
>   11 files changed, 201 insertions(+), 15 deletions(-)
>   create mode 100644 tests/qemuxml2argvdata/numavcpus-topology-mismatch.xml
>   create mode 100644 tests/qemuxml2xmloutdata/numavcpus-topology-mismatch.x86_64-latest.xml
> 




More information about the libvir-list mailing list