[PATCH 4/6] qemuDomainGetNumaParameters: Check for the correct CGroup controller

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

 



When getting info on NUMA parameters for domain,
virCgroupGetCpusetMems() may be called. However, as of 43b67f2e
the call is guarded by check if memory controller is present.
Even though it may be not obvious instantly, NUMA parameters are
stored under cpuset controller. Therefore the check needs to look
like this:

  if (!virCgroupHasController(priv->cgroup,
                              VIR_CGROUP_CONTROLLER_CPUSET) ||
      virCgroupGetCpusetMems(priv->cgroup, &nodeset) < 0) {

Signed-off-by: Michal Privoznik <mprivozn@xxxxxxxxxx>
---
 src/qemu/qemu_driver.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/src/qemu/qemu_driver.c b/src/qemu/qemu_driver.c
index f07e4fb..4d05221 100644
--- a/src/qemu/qemu_driver.c
+++ b/src/qemu/qemu_driver.c
@@ -10187,7 +10187,7 @@ qemuDomainGetNumaParameters(virDomainPtr dom,
                     goto cleanup;
             } else {
                 if (!virCgroupHasController(priv->cgroup,
-                                            VIR_CGROUP_CONTROLLER_MEMORY) ||
+                                            VIR_CGROUP_CONTROLLER_CPUSET) ||
                     virCgroupGetCpusetMems(priv->cgroup, &nodeset) < 0) {
                     nodeset = virDomainNumatuneFormatNodeset(vm->def->numa,
                                                              NULL, -1);
-- 
2.0.5

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