Re: [PATCHv2 1/7] qemu: Forbid setting maximum memory size with the API with NUMA enabled

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Wed, Feb 25, 2015 at 11:21:58AM +0100, Peter Krempa wrote:
NUMA enabled guest configuration explicitly specifies memory sizes for
individual nodes. Allowing the virDomainSetMemoryFlags API (and friends)
to change the total doesn't make sense as the individual node configs
are not updated in that case.

Forbid use of the API in case NUMA is specified.
---

Notes:
   Version 2:
   - fixed typo in subject
   - fixed incomplete sentence in comment
   - clarified that LXC doesn't use NUMA to the extent where this change would make sense in the LXC driver

src/qemu/qemu_driver.c | 10 ++++++++++
1 file changed, 10 insertions(+)

diff --git a/src/qemu/qemu_driver.c b/src/qemu/qemu_driver.c
index bec05d4..27cb3bf 100644
--- a/src/qemu/qemu_driver.c
+++ b/src/qemu/qemu_driver.c
@@ -2307,6 +2307,16 @@ static int qemuDomainSetMemoryFlags(virDomainPtr dom, unsigned long newmem,
        if (flags & VIR_DOMAIN_AFFECT_CONFIG) {
            /* Help clang 2.8 decipher the logic flow.  */
            sa_assert(persistentDef);
+
+            /* resizing memory with NUMA nodes specified doesn't work as there
+             * is no way to decrease the individual node sizes with this API */

s/decrease/change/ as I believe increase isn't possible as well.

ACK with this squashed in (or added flag that will proportionally
change node memory sizes):

diff --git i/src/qemu/qemu_driver.c w/src/qemu/qemu_driver.c
index 471b583..60c97ad 100644
--- i/src/qemu/qemu_driver.c
+++ w/src/qemu/qemu_driver.c
@@ -2309,7 +2309,7 @@ static int qemuDomainSetMemoryFlags(virDomainPtr dom, unsigned long newmem,
            sa_assert(persistentDef);

            /* resizing memory with NUMA nodes specified doesn't work as there
-             * is no way to decrease the individual node sizes with this API */
+             * is no way to changee individual node sizes with this API */
            if (virDomainNumaGetNodeCount(persistentDef->numa) > 0) {
                virReportError(VIR_ERR_OPERATION_INVALID, "%s",
                               _("maximum memory size of a domain with NUMA "
diff --git i/tools/virsh.pod w/tools/virsh.pod
index 343f26f..408cac5 100644
--- i/tools/virsh.pod
+++ w/tools/virsh.pod
@@ -1937,7 +1937,10 @@ exclusive. If no flag is specified, behavior is different depending
on hypervisor.

Some hypervisors such as QEMU/KVM don't support live changes (especially
-increasing) of the maximum memory limit.
+increasing) of the maximum memory limit.  Even persistent configuration changes
+might not be performed with some hypervisors/configuration (e.g. on NUMA enabled
+domains on QEMU).  For complex configuration changes use command B<edit>
+instead).

I<size> is a scaled integer (see B<NOTES> above); it defaults to kibibytes
(blocks of 1024 bytes) unless you provide a suffix (and the older option
--

Attachment: pgpaFDb1m2ssQ.pgp
Description: PGP signature

--
libvir-list mailing list
libvir-list@xxxxxxxxxx
https://www.redhat.com/mailman/listinfo/libvir-list

[Index of Archives]     [Virt Tools]     [Libvirt Users]     [Lib OS Info]     [Fedora Users]     [Fedora Desktop]     [Fedora SELinux]     [Big List of Linux Books]     [Yosemite News]     [KDE Users]     [Fedora Tools]