[PATCH v3 2/2] qemu_cgroup: Remove unused qemuSetupCpusetMems

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

 



This function is not used anymore. Let's remove it.

Signed-off-by: Michal Privoznik <mprivozn@xxxxxxxxxx>
---
 src/qemu/qemu_cgroup.c | 35 -----------------------------------
 src/qemu/qemu_cgroup.h |  1 -
 2 files changed, 36 deletions(-)

diff --git a/src/qemu/qemu_cgroup.c b/src/qemu/qemu_cgroup.c
index c23f0af2aa..ca76c4fdfa 100644
--- a/src/qemu/qemu_cgroup.c
+++ b/src/qemu/qemu_cgroup.c
@@ -824,41 +824,6 @@ qemuSetupDevicesCgroup(virDomainObjPtr vm)
 }
 
 
-int
-qemuSetupCpusetMems(virDomainObjPtr vm)
-{
-    virCgroupPtr cgroup_temp = NULL;
-    qemuDomainObjPrivatePtr priv = vm->privateData;
-    virDomainNumatuneMemMode mode;
-    char *mem_mask = NULL;
-    int ret = -1;
-
-    if (!virCgroupHasController(priv->cgroup, VIR_CGROUP_CONTROLLER_CPUSET))
-        return 0;
-
-    if (virDomainNumatuneGetMode(vm->def->numa, -1, &mode) < 0 ||
-        mode != VIR_DOMAIN_NUMATUNE_MEM_STRICT)
-        return 0;
-
-    if (virDomainNumatuneMaybeFormatNodeset(vm->def->numa,
-                                            priv->autoNodeset,
-                                            &mem_mask, -1) < 0)
-        goto cleanup;
-
-    if (mem_mask)
-        if (virCgroupNewThread(priv->cgroup, VIR_CGROUP_THREAD_EMULATOR, 0,
-                               false, &cgroup_temp) < 0 ||
-            virCgroupSetCpusetMems(cgroup_temp, mem_mask) < 0)
-            goto cleanup;
-
-    ret = 0;
- cleanup:
-    VIR_FREE(mem_mask);
-    virCgroupFree(&cgroup_temp);
-    return ret;
-}
-
-
 static int
 qemuSetupCpusetCgroup(virDomainObjPtr vm)
 {
diff --git a/src/qemu/qemu_cgroup.h b/src/qemu/qemu_cgroup.h
index dc6d173fce..88ad4a38b6 100644
--- a/src/qemu/qemu_cgroup.h
+++ b/src/qemu/qemu_cgroup.h
@@ -61,7 +61,6 @@ int qemuConnectCgroup(virDomainObjPtr vm);
 int qemuSetupCgroup(virDomainObjPtr vm,
                     size_t nnicindexes,
                     int *nicindexes);
-int qemuSetupCpusetMems(virDomainObjPtr vm);
 int qemuSetupCgroupVcpuBW(virCgroupPtr cgroup,
                           unsigned long long period,
                           long long quota);
-- 
2.21.0

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

  Powered by Linux