[PATCH 06/24] conf: numa: Rename virDomainNumatune to virDomainNuma

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

 



The structure will gradually become the only place for NUMA related
config, thus rename it appropriately.
---
 src/conf/domain_conf.c        | 10 +++---
 src/conf/domain_conf.h        |  2 +-
 src/conf/numa_conf.c          | 78 +++++++++++++++++++++----------------------
 src/conf/numa_conf.h          | 34 +++++++++----------
 src/libvirt_private.syms      |  4 +--
 src/lxc/lxc_cgroup.c          |  4 +--
 src/lxc/lxc_controller.c      |  6 ++--
 src/lxc/lxc_native.c          |  2 +-
 src/parallels/parallels_sdk.c |  2 +-
 src/qemu/qemu_cgroup.c        | 12 +++----
 src/qemu/qemu_command.c       |  8 ++---
 src/qemu/qemu_driver.c        | 20 +++++------
 src/qemu/qemu_process.c       |  4 +--
 13 files changed, 93 insertions(+), 93 deletions(-)

diff --git a/src/conf/domain_conf.c b/src/conf/domain_conf.c
index 06ed0fd..c9a65e1 100644
--- a/src/conf/domain_conf.c
+++ b/src/conf/domain_conf.c
@@ -2249,7 +2249,7 @@ void virDomainDefFree(virDomainDefPtr def)
         virBitmapFree(def->cputune.iothreadsched[i].ids);
     VIR_FREE(def->cputune.iothreadsched);

-    virDomainNumatuneFree(def->numatune);
+    virDomainNumaFree(def->numa);

     virSysinfoDefFree(def->sysinfo);

@@ -13508,14 +13508,14 @@ virDomainDefParseXML(xmlDocPtr xml,
         goto error;
     }

-    if (virDomainNumatuneParseXML(&def->numatune,
+    if (virDomainNumatuneParseXML(&def->numa,
                                   def->placement_mode ==
                                   VIR_DOMAIN_CPU_PLACEMENT_MODE_STATIC,
                                   def->cpu ? def->cpu->ncells : 0,
                                   ctxt) < 0)
         goto error;

-    if (virDomainNumatuneHasPlacementAuto(def->numatune) &&
+    if (virDomainNumatuneHasPlacementAuto(def->numa) &&
         !def->cpumask && !def->cputune.vcpupin &&
         !def->cputune.emulatorpin && !def->cputune.iothreadspin)
         def->placement_mode = VIR_DOMAIN_CPU_PLACEMENT_MODE_AUTO;
@@ -19894,7 +19894,7 @@ virDomainDefFormatInternal(virDomainDefPtr def,
     if (cputune)
         virBufferAddLit(buf, "</cputune>\n");

-    if (virDomainNumatuneFormatXML(buf, def->numatune) < 0)
+    if (virDomainNumatuneFormatXML(buf, def->numa) < 0)
         goto error;

     if (def->resource)
@@ -22322,7 +22322,7 @@ virDomainDefNeedsPlacementAdvice(virDomainDefPtr def)
     if (def->placement_mode == VIR_DOMAIN_CPU_PLACEMENT_MODE_AUTO)
         return true;

-    if (virDomainNumatuneHasPlacementAuto(def->numatune))
+    if (virDomainNumatuneHasPlacementAuto(def->numa))
         return true;

     return false;
diff --git a/src/conf/domain_conf.h b/src/conf/domain_conf.h
index c45e303..1e04886 100644
--- a/src/conf/domain_conf.h
+++ b/src/conf/domain_conf.h
@@ -2091,7 +2091,7 @@ struct _virDomainDef {

     virDomainCputune cputune;

-    virDomainNumatunePtr numatune;
+    virDomainNumaPtr numa;
     virDomainResourceDefPtr resource;
     virDomainIdMapDef idmap;

diff --git a/src/conf/numa_conf.c b/src/conf/numa_conf.c
index d8f1739..bcb8023 100644
--- a/src/conf/numa_conf.c
+++ b/src/conf/numa_conf.c
@@ -43,10 +43,10 @@ VIR_ENUM_IMPL(virDomainNumatunePlacement,
               "static",
               "auto");

-typedef struct _virDomainNumatuneNode virDomainNumatuneNode;
-typedef virDomainNumatuneNode *virDomainNumatuneNodePtr;
+typedef struct _virDomainNumaNode virDomainNumaNode;
+typedef virDomainNumaNode *virDomainNumaNodePtr;

-struct _virDomainNumatune {
+struct _virDomainNuma {
     struct {
         bool specified;
         virBitmapPtr nodeset;
@@ -54,7 +54,7 @@ struct _virDomainNumatune {
         virDomainNumatunePlacement placement;
     } memory;               /* pinning for all the memory */

-    struct _virDomainNumatuneNode {
+    struct _virDomainNumaNode {
         virBitmapPtr nodeset;
         virDomainNumatuneMemMode mode;
     } *mem_nodes;           /* fine tuning per guest node */
@@ -65,7 +65,7 @@ struct _virDomainNumatune {


 static inline bool
-virDomainNumatuneNodeSpecified(virDomainNumatunePtr numatune,
+virDomainNumatuneNodeSpecified(virDomainNumaPtr numatune,
                                int cellid)
 {
     if (numatune &&
@@ -77,7 +77,7 @@ virDomainNumatuneNodeSpecified(virDomainNumatunePtr numatune,
 }

 static int
-virDomainNumatuneNodeParseXML(virDomainNumatunePtr *numatunePtr,
+virDomainNumatuneNodeParseXML(virDomainNumaPtr *numatunePtr,
                               size_t ncells,
                               xmlXPathContextPtr ctxt)
 {
@@ -85,7 +85,7 @@ virDomainNumatuneNodeParseXML(virDomainNumatunePtr *numatunePtr,
     int n = 0;
     int ret = -1;
     size_t i = 0;
-    virDomainNumatunePtr numatune = *numatunePtr;
+    virDomainNumaPtr numatune = *numatunePtr;
     xmlNodePtr *nodes = NULL;

     if ((n = virXPathNodeSet("./numatune/memnode", ctxt, &nodes)) < 0) {
@@ -126,7 +126,7 @@ virDomainNumatuneNodeParseXML(virDomainNumatunePtr *numatunePtr,
     for (i = 0; i < n; i++) {
         int mode = 0;
         unsigned int cellid = 0;
-        virDomainNumatuneNodePtr mem_node = NULL;
+        virDomainNumaNodePtr mem_node = NULL;
         xmlNodePtr cur_node = nodes[i];

         tmp = virXMLPropString(cur_node, "cellid");
@@ -194,7 +194,7 @@ virDomainNumatuneNodeParseXML(virDomainNumatunePtr *numatunePtr,
 }

 int
-virDomainNumatuneParseXML(virDomainNumatunePtr *numatunePtr,
+virDomainNumatuneParseXML(virDomainNumaPtr *numatunePtr,
                           bool placement_static,
                           size_t ncells,
                           xmlXPathContextPtr ctxt)
@@ -220,7 +220,7 @@ virDomainNumatuneParseXML(virDomainNumatunePtr *numatunePtr,
     node = virXPathNode("./numatune/memory[1]", ctxt);

     if (*numatunePtr) {
-        virDomainNumatuneFree(*numatunePtr);
+        virDomainNumaFree(*numatunePtr);
         *numatunePtr = NULL;
     }

@@ -288,7 +288,7 @@ virDomainNumatuneParseXML(virDomainNumatunePtr *numatunePtr,

 int
 virDomainNumatuneFormatXML(virBufferPtr buf,
-                           virDomainNumatunePtr numatune)
+                           virDomainNumaPtr numatune)
 {
     const char *tmp = NULL;
     char *nodeset = NULL;
@@ -316,7 +316,7 @@ virDomainNumatuneFormatXML(virBufferPtr buf,
     }

     for (i = 0; i < numatune->nmem_nodes; i++) {
-        virDomainNumatuneNodePtr mem_node = &numatune->mem_nodes[i];
+        virDomainNumaNodePtr mem_node = &numatune->mem_nodes[i];

         if (!mem_node->nodeset)
             continue;
@@ -338,23 +338,23 @@ virDomainNumatuneFormatXML(virBufferPtr buf,
 }

 void
-virDomainNumatuneFree(virDomainNumatunePtr numatune)
+virDomainNumaFree(virDomainNumaPtr numa)
 {
     size_t i = 0;

-    if (!numatune)
+    if (!numa)
         return;

-    virBitmapFree(numatune->memory.nodeset);
-    for (i = 0; i < numatune->nmem_nodes; i++)
-        virBitmapFree(numatune->mem_nodes[i].nodeset);
-    VIR_FREE(numatune->mem_nodes);
+    virBitmapFree(numa->memory.nodeset);
+    for (i = 0; i < numa->nmem_nodes; i++)
+        virBitmapFree(numa->mem_nodes[i].nodeset);
+    VIR_FREE(numa->mem_nodes);

-    VIR_FREE(numatune);
+    VIR_FREE(numa);
 }

 virDomainNumatuneMemMode
-virDomainNumatuneGetMode(virDomainNumatunePtr numatune,
+virDomainNumatuneGetMode(virDomainNumaPtr numatune,
                          int cellid)
 {
     if (!numatune)
@@ -370,7 +370,7 @@ virDomainNumatuneGetMode(virDomainNumatunePtr numatune,
 }

 virBitmapPtr
-virDomainNumatuneGetNodeset(virDomainNumatunePtr numatune,
+virDomainNumatuneGetNodeset(virDomainNumaPtr numatune,
                             virBitmapPtr auto_nodeset,
                             int cellid)
 {
@@ -391,7 +391,7 @@ virDomainNumatuneGetNodeset(virDomainNumatunePtr numatune,
 }

 char *
-virDomainNumatuneFormatNodeset(virDomainNumatunePtr numatune,
+virDomainNumatuneFormatNodeset(virDomainNumaPtr numatune,
                                virBitmapPtr auto_nodeset,
                                int cellid)
 {
@@ -402,7 +402,7 @@ virDomainNumatuneFormatNodeset(virDomainNumatunePtr numatune,


 int
-virDomainNumatuneMaybeGetNodeset(virDomainNumatunePtr numatune,
+virDomainNumatuneMaybeGetNodeset(virDomainNumaPtr numatune,
                                  virBitmapPtr auto_nodeset,
                                  virBitmapPtr *retNodeset,
                                  int cellid)
@@ -432,7 +432,7 @@ virDomainNumatuneMaybeGetNodeset(virDomainNumatunePtr numatune,


 int
-virDomainNumatuneMaybeFormatNodeset(virDomainNumatunePtr numatune,
+virDomainNumatuneMaybeFormatNodeset(virDomainNumaPtr numatune,
                                     virBitmapPtr auto_nodeset,
                                     char **mask,
                                     int cellid)
@@ -451,7 +451,7 @@ virDomainNumatuneMaybeFormatNodeset(virDomainNumatunePtr numatune,
 }

 int
-virDomainNumatuneSet(virDomainNumatunePtr *numatunePtr,
+virDomainNumatuneSet(virDomainNumaPtr *numatunePtr,
                      bool placement_static,
                      int placement,
                      int mode,
@@ -459,7 +459,7 @@ virDomainNumatuneSet(virDomainNumatunePtr *numatunePtr,
 {
     bool created = false;
     int ret = -1;
-    virDomainNumatunePtr numatune;
+    virDomainNumaPtr numatune;

     /* No need to do anything in this case */
     if (mode == -1 && placement == -1 && !nodeset)
@@ -538,7 +538,7 @@ virDomainNumatuneSet(virDomainNumatunePtr *numatunePtr,

  cleanup:
     if (ret < 0 && created) {
-        virDomainNumatuneFree(*numatunePtr);
+        virDomainNumaFree(*numatunePtr);
         *numatunePtr = NULL;
     }

@@ -546,8 +546,8 @@ virDomainNumatuneSet(virDomainNumatunePtr *numatunePtr,
 }

 static bool
-virDomainNumatuneNodesEqual(virDomainNumatunePtr n1,
-                            virDomainNumatunePtr n2)
+virDomainNumaNodesEqual(virDomainNumaPtr n1,
+                        virDomainNumaPtr n2)
 {
     size_t i = 0;

@@ -555,8 +555,8 @@ virDomainNumatuneNodesEqual(virDomainNumatunePtr n1,
         return false;

     for (i = 0; i < n1->nmem_nodes; i++) {
-        virDomainNumatuneNodePtr nd1 = &n1->mem_nodes[i];
-        virDomainNumatuneNodePtr nd2 = &n2->mem_nodes[i];
+        virDomainNumaNodePtr nd1 = &n1->mem_nodes[i];
+        virDomainNumaNodePtr nd2 = &n2->mem_nodes[i];

         if (!nd1->nodeset && !nd2->nodeset)
             continue;
@@ -572,8 +572,8 @@ virDomainNumatuneNodesEqual(virDomainNumatunePtr n1,
 }

 bool
-virDomainNumatuneEquals(virDomainNumatunePtr n1,
-                        virDomainNumatunePtr n2)
+virDomainNumaEquals(virDomainNumaPtr n1,
+                        virDomainNumaPtr n2)
 {
     if (!n1 && !n2)
         return true;
@@ -582,7 +582,7 @@ virDomainNumatuneEquals(virDomainNumatunePtr n1,
         return false;

     if (!n1->memory.specified && !n2->memory.specified)
-        return virDomainNumatuneNodesEqual(n1, n2);
+        return virDomainNumaNodesEqual(n1, n2);

     if (!n1->memory.specified || !n2->memory.specified)
         return false;
@@ -596,11 +596,11 @@ virDomainNumatuneEquals(virDomainNumatunePtr n1,
     if (!virBitmapEqual(n1->memory.nodeset, n2->memory.nodeset))
         return false;

-    return virDomainNumatuneNodesEqual(n1, n2);
+    return virDomainNumaNodesEqual(n1, n2);
 }

 bool
-virDomainNumatuneHasPlacementAuto(virDomainNumatunePtr numatune)
+virDomainNumatuneHasPlacementAuto(virDomainNumaPtr numatune)
 {
     if (!numatune)
         return false;
@@ -615,7 +615,7 @@ virDomainNumatuneHasPlacementAuto(virDomainNumatunePtr numatune)
 }

 bool
-virDomainNumatuneHasPerNodeBinding(virDomainNumatunePtr numatune)
+virDomainNumatuneHasPerNodeBinding(virDomainNumaPtr numatune)
 {
     size_t i = 0;

@@ -631,7 +631,7 @@ virDomainNumatuneHasPerNodeBinding(virDomainNumatunePtr numatune)
 }

 int
-virDomainNumatuneSpecifiedMaxNode(virDomainNumatunePtr numatune)
+virDomainNumatuneSpecifiedMaxNode(virDomainNumaPtr numatune)
 {
     int ret = -1;
     virBitmapPtr nodemask = NULL;
@@ -659,7 +659,7 @@ virDomainNumatuneSpecifiedMaxNode(virDomainNumatunePtr numatune)
 }

 bool
-virDomainNumatuneNodesetIsAvailable(virDomainNumatunePtr numatune,
+virDomainNumatuneNodesetIsAvailable(virDomainNumaPtr numatune,
                                     virBitmapPtr auto_nodeset)
 {
     size_t i = 0;
diff --git a/src/conf/numa_conf.h b/src/conf/numa_conf.h
index 9202355..0adeaa4 100644
--- a/src/conf/numa_conf.h
+++ b/src/conf/numa_conf.h
@@ -32,8 +32,8 @@
 # include "cpu_conf.h"


-typedef struct _virDomainNumatune virDomainNumatune;
-typedef virDomainNumatune *virDomainNumatunePtr;
+typedef struct _virDomainNuma virDomainNuma;
+typedef virDomainNuma *virDomainNumaPtr;

 typedef enum {
     VIR_DOMAIN_NUMATUNE_PLACEMENT_DEFAULT = 0,
@@ -47,31 +47,31 @@ VIR_ENUM_DECL(virDomainNumatunePlacement)
 VIR_ENUM_DECL(virDomainNumatuneMemMode)


-void virDomainNumatuneFree(virDomainNumatunePtr numatune);
+void virDomainNumaFree(virDomainNumaPtr numa);

 /*
  * XML Parse/Format functions
  */
-int virDomainNumatuneParseXML(virDomainNumatunePtr *numatunePtr,
+int virDomainNumatuneParseXML(virDomainNumaPtr *numatunePtr,
                               bool placement_static,
                               size_t ncells,
                               xmlXPathContextPtr ctxt)
     ATTRIBUTE_NONNULL(1) ATTRIBUTE_NONNULL(4);

-int virDomainNumatuneFormatXML(virBufferPtr buf, virDomainNumatunePtr numatune)
+int virDomainNumatuneFormatXML(virBufferPtr buf, virDomainNumaPtr numatune)
     ATTRIBUTE_NONNULL(1);

 /*
  * Getters
  */
-virDomainNumatuneMemMode virDomainNumatuneGetMode(virDomainNumatunePtr numatune,
+virDomainNumatuneMemMode virDomainNumatuneGetMode(virDomainNumaPtr numatune,
                                                   int cellid);

-virBitmapPtr virDomainNumatuneGetNodeset(virDomainNumatunePtr numatune,
+virBitmapPtr virDomainNumatuneGetNodeset(virDomainNumaPtr numatune,
                                          virBitmapPtr auto_nodeset,
                                          int cellid);

-int virDomainNumatuneMaybeGetNodeset(virDomainNumatunePtr numatune,
+int virDomainNumatuneMaybeGetNodeset(virDomainNumaPtr numatune,
                                      virBitmapPtr auto_nodeset,
                                      virBitmapPtr *retNodeset,
                                      int cellid);
@@ -79,11 +79,11 @@ int virDomainNumatuneMaybeGetNodeset(virDomainNumatunePtr numatune,
 /*
  * Formatters
  */
-char *virDomainNumatuneFormatNodeset(virDomainNumatunePtr numatune,
+char *virDomainNumatuneFormatNodeset(virDomainNumaPtr numatune,
                                      virBitmapPtr auto_nodeset,
                                      int cellid);

-int virDomainNumatuneMaybeFormatNodeset(virDomainNumatunePtr numatune,
+int virDomainNumatuneMaybeFormatNodeset(virDomainNumaPtr numatune,
                                         virBitmapPtr auto_nodeset,
                                         char **mask,
                                         int cellid);
@@ -91,7 +91,7 @@ int virDomainNumatuneMaybeFormatNodeset(virDomainNumatunePtr numatune,
 /*
  * Setters
  */
-int virDomainNumatuneSet(virDomainNumatunePtr *numatunePtr,
+int virDomainNumatuneSet(virDomainNumaPtr *numatunePtr,
                          bool placement_static,
                          int placement,
                          int mode,
@@ -101,16 +101,16 @@ int virDomainNumatuneSet(virDomainNumatunePtr *numatunePtr,
 /*
  * Other accessors
  */
-bool virDomainNumatuneEquals(virDomainNumatunePtr n1,
-                             virDomainNumatunePtr n2);
+bool virDomainNumaEquals(virDomainNumaPtr n1,
+                         virDomainNumaPtr n2);

-bool virDomainNumatuneHasPlacementAuto(virDomainNumatunePtr numatune);
+bool virDomainNumatuneHasPlacementAuto(virDomainNumaPtr numatune);

-bool virDomainNumatuneHasPerNodeBinding(virDomainNumatunePtr numatune);
+bool virDomainNumatuneHasPerNodeBinding(virDomainNumaPtr numatune);

-int virDomainNumatuneSpecifiedMaxNode(virDomainNumatunePtr numatune);
+int virDomainNumatuneSpecifiedMaxNode(virDomainNumaPtr numatune);

-bool virDomainNumatuneNodesetIsAvailable(virDomainNumatunePtr numatune,
+bool virDomainNumatuneNodesetIsAvailable(virDomainNumaPtr numatune,
                                          virBitmapPtr auto_nodeset);

 int virDomainNumaDefCPUParseXML(virCPUDefPtr def, xmlXPathContextPtr ctxt);
diff --git a/src/libvirt_private.syms b/src/libvirt_private.syms
index edd54b8..278124c 100644
--- a/src/libvirt_private.syms
+++ b/src/libvirt_private.syms
@@ -626,10 +626,10 @@ virNodeDeviceObjUnlock;


 # conf/numa_conf.h
-virDomainNumatuneEquals;
+virDomainNumaEquals;
+virDomainNumaFree;
 virDomainNumatuneFormatNodeset;
 virDomainNumatuneFormatXML;
-virDomainNumatuneFree;
 virDomainNumatuneGetMode;
 virDomainNumatuneGetNodeset;
 virDomainNumatuneHasPerNodeBinding;
diff --git a/src/lxc/lxc_cgroup.c b/src/lxc/lxc_cgroup.c
index 1dfa9a4..8e46a01 100644
--- a/src/lxc/lxc_cgroup.c
+++ b/src/lxc/lxc_cgroup.c
@@ -79,11 +79,11 @@ static int virLXCCgroupSetupCpusetTune(virDomainDefPtr def,
             goto cleanup;
     }

-    if (virDomainNumatuneGetMode(def->numatune, -1) !=
+    if (virDomainNumatuneGetMode(def->numa, -1) !=
         VIR_DOMAIN_NUMATUNE_MEM_STRICT)
         goto cleanup;

-    if (virDomainNumatuneMaybeFormatNodeset(def->numatune, nodemask,
+    if (virDomainNumatuneMaybeFormatNodeset(def->numa, nodemask,
                                             &mask, -1) < 0)
         goto cleanup;

diff --git a/src/lxc/lxc_controller.c b/src/lxc/lxc_controller.c
index 8a7c7e8..8545f29 100644
--- a/src/lxc/lxc_controller.c
+++ b/src/lxc/lxc_controller.c
@@ -747,8 +747,8 @@ static int virLXCControllerSetupResourceLimits(virLXCControllerPtr ctrl)
     if (virLXCControllerGetNumadAdvice(ctrl, &auto_nodeset) < 0)
         goto cleanup;

-    nodeset = virDomainNumatuneGetNodeset(ctrl->def->numatune, auto_nodeset, -1);
-    mode = virDomainNumatuneGetMode(ctrl->def->numatune, -1);
+    nodeset = virDomainNumatuneGetNodeset(ctrl->def->numa, auto_nodeset, -1);
+    mode = virDomainNumatuneGetMode(ctrl->def->numa, -1);

     if (virNumaSetupMemoryPolicy(mode, nodeset) < 0)
         goto cleanup;
@@ -778,7 +778,7 @@ static int virLXCControllerSetupCgroupLimits(virLXCControllerPtr ctrl)
     if (virLXCControllerGetNumadAdvice(ctrl, &auto_nodeset) < 0)
         goto cleanup;

-    nodeset = virDomainNumatuneGetNodeset(ctrl->def->numatune, auto_nodeset, -1);
+    nodeset = virDomainNumatuneGetNodeset(ctrl->def->numa, auto_nodeset, -1);

     if (!(ctrl->cgroup = virLXCCgroupCreate(ctrl->def,
                                             ctrl->initpid,
diff --git a/src/lxc/lxc_native.c b/src/lxc/lxc_native.c
index 961c24b..cd3b86b 100644
--- a/src/lxc/lxc_native.c
+++ b/src/lxc/lxc_native.c
@@ -847,7 +847,7 @@ lxcSetCpusetTune(virDomainDefPtr def, virConfPtr properties)
         value->str) {
         if (virBitmapParse(value->str, 0, &nodeset, VIR_DOMAIN_CPUMASK_LEN) < 0)
             return -1;
-        if (virDomainNumatuneSet(&def->numatune,
+        if (virDomainNumatuneSet(&def->numa,
                                  def->placement_mode ==
                                  VIR_DOMAIN_CPU_PLACEMENT_MODE_STATIC,
                                  VIR_DOMAIN_NUMATUNE_PLACEMENT_STATIC,
diff --git a/src/parallels/parallels_sdk.c b/src/parallels/parallels_sdk.c
index d0d2ce2..8c05b32 100644
--- a/src/parallels/parallels_sdk.c
+++ b/src/parallels/parallels_sdk.c
@@ -1825,7 +1825,7 @@ prlsdkCheckUnsupportedParams(PRL_HANDLE sdkdom, virDomainDefPtr def)
         return -1;
     }

-    if (def->numatune) {
+    if (def->numa) {
         virReportError(VIR_ERR_CONFIG_UNSUPPORTED, "%s",
                         _("numa parameters are not supported "
                           "by parallels driver"));
diff --git a/src/qemu/qemu_cgroup.c b/src/qemu/qemu_cgroup.c
index fc46450..c33b121 100644
--- a/src/qemu/qemu_cgroup.c
+++ b/src/qemu/qemu_cgroup.c
@@ -619,11 +619,11 @@ qemuSetupCpusetMems(virDomainObjPtr vm)
     if (!virCgroupHasController(priv->cgroup, VIR_CGROUP_CONTROLLER_CPUSET))
         return 0;

-    if (virDomainNumatuneGetMode(vm->def->numatune, -1) !=
+    if (virDomainNumatuneGetMode(vm->def->numa, -1) !=
         VIR_DOMAIN_NUMATUNE_MEM_STRICT)
         return 0;

-    if (virDomainNumatuneMaybeFormatNodeset(vm->def->numatune,
+    if (virDomainNumatuneMaybeFormatNodeset(vm->def->numa,
                                             priv->autoNodeset,
                                             &mem_mask, -1) < 0)
         goto cleanup;
@@ -1030,9 +1030,9 @@ qemuSetupCgroupForVcpu(virDomainObjPtr vm)
         return 0;
     }

-    if (virDomainNumatuneGetMode(vm->def->numatune, -1) ==
+    if (virDomainNumatuneGetMode(vm->def->numa, -1) ==
         VIR_DOMAIN_NUMATUNE_MEM_STRICT &&
-        virDomainNumatuneMaybeFormatNodeset(vm->def->numatune,
+        virDomainNumatuneMaybeFormatNodeset(vm->def->numa,
                                             priv->autoNodeset,
                                             &mem_mask, -1) < 0)
         goto cleanup;
@@ -1201,9 +1201,9 @@ qemuSetupCgroupForIOThreads(virDomainObjPtr vm)
         return 0;
     }

-    if (virDomainNumatuneGetMode(vm->def->numatune, -1) ==
+    if (virDomainNumatuneGetMode(vm->def->numa, -1) ==
         VIR_DOMAIN_NUMATUNE_MEM_STRICT &&
-        virDomainNumatuneMaybeFormatNodeset(vm->def->numatune,
+        virDomainNumatuneMaybeFormatNodeset(vm->def->numa,
                                             priv->autoNodeset,
                                             &mem_mask, -1) < 0)
         goto cleanup;
diff --git a/src/qemu/qemu_command.c b/src/qemu/qemu_command.c
index 084530f..c4ae596 100644
--- a/src/qemu/qemu_command.c
+++ b/src/qemu/qemu_command.c
@@ -4571,7 +4571,7 @@ qemuBuildMemoryBackendStr(unsigned long long size,
     if (!(props = virJSONValueNewObject()))
         return -1;

-    mode = virDomainNumatuneGetMode(def->numatune, guestNode);
+    mode = virDomainNumatuneGetMode(def->numa, guestNode);

     if (pagesize == 0 || pagesize != system_page_size) {
         /* Find the huge page size we want to use */
@@ -4682,7 +4682,7 @@ qemuBuildMemoryBackendStr(unsigned long long size,
     if (userNodeset) {
         nodemask = userNodeset;
     } else {
-        if (virDomainNumatuneMaybeGetNodeset(def->numatune, autoNodeset,
+        if (virDomainNumatuneMaybeGetNodeset(def->numa, autoNodeset,
                                              &nodemask, guestNode) < 0)
             goto cleanup;
     }
@@ -7120,7 +7120,7 @@ qemuBuildNumaArgStr(virQEMUDriverConfigPtr cfg,
     int ret = -1;
     const long system_page_size = virGetSystemPageSizeKB();

-    if (virDomainNumatuneHasPerNodeBinding(def->numatune) &&
+    if (virDomainNumatuneHasPerNodeBinding(def->numa) &&
         !(virQEMUCapsGet(qemuCaps, QEMU_CAPS_OBJECT_MEMORY_RAM) ||
           virQEMUCapsGet(qemuCaps, QEMU_CAPS_OBJECT_MEMORY_FILE))) {
         virReportError(VIR_ERR_CONFIG_UNSUPPORTED, "%s",
@@ -7138,7 +7138,7 @@ qemuBuildNumaArgStr(virQEMUDriverConfigPtr cfg,
         goto cleanup;
     }

-    if (!virDomainNumatuneNodesetIsAvailable(def->numatune, auto_nodeset))
+    if (!virDomainNumatuneNodesetIsAvailable(def->numa, auto_nodeset))
         goto cleanup;

     for (i = 0; i < def->mem.nhugepages; i++) {
diff --git a/src/qemu/qemu_driver.c b/src/qemu/qemu_driver.c
index 709f468..1c2ace9 100644
--- a/src/qemu/qemu_driver.c
+++ b/src/qemu/qemu_driver.c
@@ -4544,9 +4544,9 @@ static int qemuDomainHotplugVcpus(virQEMUDriverPtr driver,
         goto cleanup;
     }

-    if (virDomainNumatuneGetMode(vm->def->numatune, -1) ==
+    if (virDomainNumatuneGetMode(vm->def->numa, -1) ==
         VIR_DOMAIN_NUMATUNE_MEM_STRICT &&
-        virDomainNumatuneMaybeFormatNodeset(vm->def->numatune,
+        virDomainNumatuneMaybeFormatNodeset(vm->def->numa,
                                             priv->autoNodeset,
                                             &mem_mask, -1) < 0)
         goto cleanup;
@@ -9404,7 +9404,7 @@ qemuDomainSetNumaParamsLive(virDomainObjPtr vm,
     size_t i = 0;
     int ret = -1;

-    if (virDomainNumatuneGetMode(vm->def->numatune, -1) !=
+    if (virDomainNumatuneGetMode(vm->def->numa, -1) !=
         VIR_DOMAIN_NUMATUNE_MEM_STRICT) {
         virReportError(VIR_ERR_OPERATION_INVALID, "%s",
                        _("change of nodeset for running domain "
@@ -9533,7 +9533,7 @@ qemuDomainSetNumaParameters(virDomainPtr dom,

     if (flags & VIR_DOMAIN_AFFECT_LIVE) {
         if (mode != -1 &&
-            virDomainNumatuneGetMode(vm->def->numatune, -1) != mode) {
+            virDomainNumatuneGetMode(vm->def->numa, -1) != mode) {
             virReportError(VIR_ERR_OPERATION_INVALID, "%s",
                            _("can't change numatune mode for running domain"));
             goto endjob;
@@ -9543,7 +9543,7 @@ qemuDomainSetNumaParameters(virDomainPtr dom,
             qemuDomainSetNumaParamsLive(vm, nodeset) < 0)
             goto endjob;

-        if (virDomainNumatuneSet(&vm->def->numatune,
+        if (virDomainNumatuneSet(&vm->def->numa,
                                  vm->def->placement_mode ==
                                  VIR_DOMAIN_CPU_PLACEMENT_MODE_STATIC,
                                  -1, mode, nodeset) < 0)
@@ -9554,7 +9554,7 @@ qemuDomainSetNumaParameters(virDomainPtr dom,
     }

     if (flags & VIR_DOMAIN_AFFECT_CONFIG) {
-        if (virDomainNumatuneSet(&persistentDef->numatune,
+        if (virDomainNumatuneSet(&persistentDef->numa,
                                  persistentDef->placement_mode ==
                                  VIR_DOMAIN_CPU_PLACEMENT_MODE_STATIC,
                                  -1, mode, nodeset) < 0)
@@ -9632,14 +9632,14 @@ qemuDomainGetNumaParameters(virDomainPtr dom,
                 goto cleanup;

             if (flags & VIR_DOMAIN_AFFECT_CONFIG)
-                param->value.i = virDomainNumatuneGetMode(persistentDef->numatune, -1);
+                param->value.i = virDomainNumatuneGetMode(persistentDef->numa, -1);
             else
-                param->value.i = virDomainNumatuneGetMode(vm->def->numatune, -1);
+                param->value.i = virDomainNumatuneGetMode(vm->def->numa, -1);
             break;

         case 1: /* fill numa nodeset here */
             if (flags & VIR_DOMAIN_AFFECT_CONFIG) {
-                nodeset = virDomainNumatuneFormatNodeset(persistentDef->numatune,
+                nodeset = virDomainNumatuneFormatNodeset(persistentDef->numa,
                                                          NULL, -1);
                 if (!nodeset)
                     goto cleanup;
@@ -9647,7 +9647,7 @@ qemuDomainGetNumaParameters(virDomainPtr dom,
                 if (!virCgroupHasController(priv->cgroup,
                                             VIR_CGROUP_CONTROLLER_MEMORY) ||
                     virCgroupGetCpusetMems(priv->cgroup, &nodeset) < 0) {
-                    nodeset = virDomainNumatuneFormatNodeset(vm->def->numatune,
+                    nodeset = virDomainNumatuneFormatNodeset(vm->def->numa,
                                                              NULL, -1);
                     if (!nodeset)
                         goto cleanup;
diff --git a/src/qemu/qemu_process.c b/src/qemu/qemu_process.c
index 1d4e957..61790f4 100644
--- a/src/qemu/qemu_process.c
+++ b/src/qemu/qemu_process.c
@@ -3257,8 +3257,8 @@ static int qemuProcessHook(void *data)
     if (virSecurityManagerClearSocketLabel(h->driver->securityManager, h->vm->def) < 0)
         goto cleanup;

-    mode = virDomainNumatuneGetMode(h->vm->def->numatune, -1);
-    nodeset = virDomainNumatuneGetNodeset(h->vm->def->numatune,
+    mode = virDomainNumatuneGetMode(h->vm->def->numa, -1);
+    nodeset = virDomainNumatuneGetNodeset(h->vm->def->numa,
                                           priv->autoNodeset, -1);

     if (virNumaSetupMemoryPolicy(mode, nodeset) < 0)
-- 
2.2.2

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