Re: [PATCH] qemu: Set placement when setting numa parameters

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

 



On 2012年08月29日 00:00, Osier Yang wrote:
To keep the internal data structure consistent.

I should mention this is v3, v2 is here:

https://www.redhat.com/archives/libvir-list/2012-July/msg01680.html

---
  src/qemu/qemu_driver.c |    7 +++++++
  1 files changed, 7 insertions(+), 0 deletions(-)

diff --git a/src/qemu/qemu_driver.c b/src/qemu/qemu_driver.c
index d74bf52..955744a 100644
--- a/src/qemu/qemu_driver.c
+++ b/src/qemu/qemu_driver.c
@@ -7585,6 +7585,8 @@ qemuDomainSetNumaParameters(virDomainPtr dom,
                  }

                  vm->def->numatune.memory.nodemask = nodeset;
+                vm->def->numatune.memory.placement_mode =
+                    VIR_DOMAIN_NUMATUNE_MEM_PLACEMENT_MODE_STATIC;
              }

              if (flags&  VIR_DOMAIN_AFFECT_CONFIG) {
@@ -7601,11 +7603,16 @@ qemuDomainSetNumaParameters(virDomainPtr dom,
                  }

                  persistentDef->numatune.memory.nodemask = nodeset;
+                persistentDef->numatune.memory.placement_mode =
+                    VIR_DOMAIN_NUMATUNE_MEM_PLACEMENT_MODE_STATIC;
              }
          }
      }

      if (flags&  VIR_DOMAIN_AFFECT_CONFIG) {
+        if (!persistentDef->numatune.memory.placement_mode)
+            persistentDef->numatune.memory.placement_mode =
+                VIR_DOMAIN_NUMATUNE_MEM_PLACEMENT_MODE_AUTO;
          if (virDomainSaveConfig(driver->configDir, persistentDef)<  0)
              ret = -1;
      }

--
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]