[PATCH v2 4/4] conf: Deduplicate NUMA distance code
Peter Krempa
pkrempa at redhat.com
Mon May 24 16:54:55 UTC 2021
On Mon, May 24, 2021 at 14:03:09 +0200, Michal Privoznik wrote:
> After previous patches we have two structures:
> virCapsHostNUMACellDistance and virNumaDistance which express the
> same thing. And have the exact same members (modulo their names).
> Drop the former in favor of the latter.
>
> This change means that distances with value of 0 are no longer
> printed out into capabilities XML, because domain XML code allows
> partial distance specification and thus threats value of 0 as
> unspecified by user (see virDomainNumaGetNodeDistance() which
> returns the default LOCAL/REMOTE distance for value of 0).
>
> Also, from ACPI 6.1 specification, section 5.2.17 System Locality
> Distance Information Table (SLIT):
>
> Distance values of 0-9 are reserved and have no meaning.
>
> Thus we shouldn't be ever reporting 0 in neither domain nor
> capabilities XML.
>
> Signed-off-by: Michal Privoznik <mprivozn at redhat.com>
> ---
>
> diff to v1:
> - Filled in justification to stop reporting 0 distance in capabilities
> XML (which we never did anyway).
> - Change capabilities RNG to make it obvious that NUMA distances are the
> same in domain and capabilities XMLs.
>
> docs/schemas/capability.rng | 13 +++----------
> src/conf/capabilities.c | 26 ++++++++------------------
> src/conf/capabilities.h | 11 +++--------
> src/conf/virconftypes.h | 2 --
> src/libxl/libxl_capabilities.c | 8 ++++----
> 5 files changed, 18 insertions(+), 42 deletions(-)
Reviewed-by: Peter Krempa <pkrempa at redhat.com>
More information about the libvir-list
mailing list