[PATCH v2 3/3] virnuma: remove redundant check for numanode

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

 



Signed-off-by: Chen Fan <chen.fan.fnst@xxxxxxxxxxxxxx>
---
 src/util/virnuma.c | 15 ---------------
 1 file changed, 15 deletions(-)

diff --git a/src/util/virnuma.c b/src/util/virnuma.c
index 411719d..8431b3c 100644
--- a/src/util/virnuma.c
+++ b/src/util/virnuma.c
@@ -95,31 +95,16 @@ virNumaSetupMemoryPolicy(virDomainNumatunePtr numatune,
     int ret = -1;
     int bit = 0;
     size_t i;
-    int maxnode = 0;
     virBitmapPtr tmp_nodemask = NULL;
 
     tmp_nodemask = virDomainNumatuneGetNodeset(numatune, nodemask, -1);
     if (!tmp_nodemask)
         return 0;
 
-    if (numa_available() < 0) {
-        virReportError(VIR_ERR_INTERNAL_ERROR,
-                       "%s", _("Host kernel is not aware of NUMA."));
-        return -1;
-    }
-
-    maxnode = numa_max_node();
-    maxnode = maxnode < NUMA_NUM_NODES ? maxnode : NUMA_NUM_NODES;
-
     /* Convert nodemask to NUMA bitmask. */
     nodemask_zero(&mask);
     bit = -1;
     while ((bit = virBitmapNextSetBit(tmp_nodemask, bit)) >= 0) {
-        if (bit > maxnode) {
-            virReportError(VIR_ERR_INTERNAL_ERROR,
-                           _("NUMA node %d is out of range"), bit);
-            return -1;
-        }
         nodemask_set(&mask, bit);
     }
 
-- 
1.9.3

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