[PATCH 6/8] qemu: cgroup: Kill qemuSetupCgroupIOThreadsPin()

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

 



The function doesn't make sense. There's a simpler way to achieve the
same.
---
 src/qemu/qemu_cgroup.c | 15 ---------------
 src/qemu/qemu_cgroup.h |  4 ----
 src/qemu/qemu_driver.c |  5 +----
 3 files changed, 1 insertion(+), 23 deletions(-)

diff --git a/src/qemu/qemu_cgroup.c b/src/qemu/qemu_cgroup.c
index fad7003..bd768ef 100644
--- a/src/qemu/qemu_cgroup.c
+++ b/src/qemu/qemu_cgroup.c
@@ -958,21 +958,6 @@ qemuSetupCgroupVcpuPin(virCgroupPtr cgroup,
     return -1;
 }

-int
-qemuSetupCgroupIOThreadsPin(virCgroupPtr cgroup,
-                            virDomainPinDefPtr *iothreadspin,
-                            int niothreadspin,
-                            int iothreadid)
-{
-    size_t i;
-
-    for (i = 0; i < niothreadspin; i++) {
-        if (iothreadid == iothreadspin[i]->id)
-            return qemuSetupCgroupCpusetCpus(cgroup, iothreadspin[i]->cpumask);
-    }
-
-    return -1;
-}

 int
 qemuSetupCgroupCpusetCpus(virCgroupPtr cgroup,
diff --git a/src/qemu/qemu_cgroup.h b/src/qemu/qemu_cgroup.h
index 0f7be7e..cdeb307 100644
--- a/src/qemu/qemu_cgroup.h
+++ b/src/qemu/qemu_cgroup.h
@@ -57,10 +57,6 @@ int qemuSetupCgroupVcpuPin(virCgroupPtr cgroup,
                            int nvcpupin,
                            int vcpuid);
 int qemuSetupCgroupCpusetCpus(virCgroupPtr cgroup, virBitmapPtr cpumask);
-int qemuSetupCgroupIOThreadsPin(virCgroupPtr cgroup,
-                                virDomainPinDefPtr *iothreadspin,
-                                int niothreadspin,
-                                int iothreadid);
 int qemuSetupCgroupForVcpu(virDomainObjPtr vm);
 int qemuSetupCgroupForIOThreads(virDomainObjPtr vm);
 int qemuSetupCgroupForEmulator(virDomainObjPtr vm);
diff --git a/src/qemu/qemu_driver.c b/src/qemu/qemu_driver.c
index 949ba44..fc44ef1 100644
--- a/src/qemu/qemu_driver.c
+++ b/src/qemu/qemu_driver.c
@@ -6016,10 +6016,7 @@ qemuDomainPinIOThread(virDomainPtr dom,
             if (virCgroupNewIOThread(priv->cgroup, iothread_id,
                                      false, &cgroup_iothread) < 0)
                 goto endjob;
-            if (qemuSetupCgroupIOThreadsPin(cgroup_iothread,
-                                            newIOThreadsPin,
-                                            newIOThreadsPinNum,
-                                            iothread_id) < 0) {
+            if (qemuSetupCgroupCpusetCpus(cgroup_iothread, pcpumap) < 0) {
                 virReportError(VIR_ERR_OPERATION_INVALID,
                                _("failed to set cpuset.cpus in cgroup"
                                  " for iothread %d"), iothread_id);
-- 
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]