On Wed, Feb 25, 2015 at 11:22:06AM +0100, Peter Krempa wrote:
Use the NUMA total instead of the configured size both in XML and for uses in the code once NUMA is enabled for a domain. One test case change is necessary as the rounding of the individual cell sizes was not matching the rounding of the total size. --- Notes: Version 2: - Already ACKed but didn't make sense to push. src/conf/domain_conf.c | 6 ++++++ tests/qemuxml2argvdata/qemuxml2argv-numatune-memnode.args | 2 +- 2 files changed, 7 insertions(+), 1 deletion(-) diff --git a/src/conf/domain_conf.c b/src/conf/domain_conf.c index b41ae17..b2a9297 100644 --- a/src/conf/domain_conf.c +++ b/src/conf/domain_conf.c @@ -6904,6 +6904,12 @@ virDomainParseMemory(const char *xpath, unsigned long long virDomainDefGetMemoryInitial(virDomainDefPtr def) { + unsigned long long ret; + + /* return NUMA memory size total in case numa is enabled */ + if ((ret = virDomainNumaGetMemorySize(def->numa)) > 0) + return ret; + return def->mem.max_balloon; }
If this accessor is used everywhere, then we can make the memory element optional and count the memory from numa specification, right?
diff --git a/tests/qemuxml2argvdata/qemuxml2argv-numatune-memnode.args b/tests/qemuxml2argvdata/qemuxml2argv-numatune-memnode.args index 513d657..5dd7fcd 100644 --- a/tests/qemuxml2argvdata/qemuxml2argv-numatune-memnode.args +++ b/tests/qemuxml2argvdata/qemuxml2argv-numatune-memnode.args @@ -1,5 +1,5 @@ LC_ALL=C PATH=/bin HOME=/home/test USER=test LOGNAME=test QEMU_AUDIO_DRV=none \ -/usr/bin/kvm -S -M pc -m 24104 -smp 32 \ +/usr/bin/kvm -S -M pc -m 24105 -smp 32 \ -object memory-backend-ram,id=ram-node0,size=20971520,host-nodes=3,\ policy=preferred \ -numa node,nodeid=0,cpus=0,memdev=ram-node0 \ -- 2.2.2 -- libvir-list mailing list libvir-list@xxxxxxxxxx https://www.redhat.com/mailman/listinfo/libvir-list
Attachment:
pgpAqnzN3qXeQ.pgp
Description: PGP signature
-- libvir-list mailing list libvir-list@xxxxxxxxxx https://www.redhat.com/mailman/listinfo/libvir-list