The function is used to set cpuset.cpus in various other helpers. --- src/qemu/qemu_cgroup.c | 14 +++++++------- src/qemu/qemu_cgroup.h | 2 +- src/qemu/qemu_driver.c | 4 ++-- 3 files changed, 10 insertions(+), 10 deletions(-) diff --git a/src/qemu/qemu_cgroup.c b/src/qemu/qemu_cgroup.c index 7ba3059..fad7003 100644 --- a/src/qemu/qemu_cgroup.c +++ b/src/qemu/qemu_cgroup.c @@ -952,7 +952,7 @@ qemuSetupCgroupVcpuPin(virCgroupPtr cgroup, for (i = 0; i < nvcpupin; i++) { if (vcpuid == vcpupin[i]->id) - return qemuSetupCgroupEmulatorPin(cgroup, vcpupin[i]->cpumask); + return qemuSetupCgroupCpusetCpus(cgroup, vcpupin[i]->cpumask); } return -1; @@ -968,15 +968,15 @@ qemuSetupCgroupIOThreadsPin(virCgroupPtr cgroup, for (i = 0; i < niothreadspin; i++) { if (iothreadid == iothreadspin[i]->id) - return qemuSetupCgroupEmulatorPin(cgroup, iothreadspin[i]->cpumask); + return qemuSetupCgroupCpusetCpus(cgroup, iothreadspin[i]->cpumask); } return -1; } int -qemuSetupCgroupEmulatorPin(virCgroupPtr cgroup, - virBitmapPtr cpumask) +qemuSetupCgroupCpusetCpus(virCgroupPtr cgroup, + virBitmapPtr cpumask) { int ret = -1; char *new_cpus = NULL; @@ -1078,7 +1078,7 @@ qemuSetupCgroupForVcpu(virDomainObjPtr vm) if (!cpumap) continue; - if (qemuSetupCgroupEmulatorPin(cgroup_vcpu, cpumap) < 0) + if (qemuSetupCgroupCpusetCpus(cgroup_vcpu, cpumap) < 0) goto cleanup; } @@ -1142,7 +1142,7 @@ qemuSetupCgroupForEmulator(virDomainObjPtr vm) if (cpumask) { if (virCgroupHasController(priv->cgroup, VIR_CGROUP_CONTROLLER_CPUSET) && - qemuSetupCgroupEmulatorPin(cgroup_emulator, cpumask) < 0) + qemuSetupCgroupCpusetCpus(cgroup_emulator, cpumask) < 0) goto cleanup; } @@ -1252,7 +1252,7 @@ qemuSetupCgroupForIOThreads(virDomainObjPtr vm) } if (cpumask && - qemuSetupCgroupEmulatorPin(cgroup_iothread, cpumask) < 0) + qemuSetupCgroupCpusetCpus(cgroup_iothread, cpumask) < 0) goto cleanup; } diff --git a/src/qemu/qemu_cgroup.h b/src/qemu/qemu_cgroup.h index 11893ef..0f7be7e 100644 --- a/src/qemu/qemu_cgroup.h +++ b/src/qemu/qemu_cgroup.h @@ -56,7 +56,7 @@ int qemuSetupCgroupVcpuPin(virCgroupPtr cgroup, virDomainPinDefPtr *vcpupin, int nvcpupin, int vcpuid); -int qemuSetupCgroupEmulatorPin(virCgroupPtr cgroup, virBitmapPtr cpumask); +int qemuSetupCgroupCpusetCpus(virCgroupPtr cgroup, virBitmapPtr cpumask); int qemuSetupCgroupIOThreadsPin(virCgroupPtr cgroup, virDomainPinDefPtr *iothreadspin, int niothreadspin, diff --git a/src/qemu/qemu_driver.c b/src/qemu/qemu_driver.c index db4f0b4..949ba44 100644 --- a/src/qemu/qemu_driver.c +++ b/src/qemu/qemu_driver.c @@ -5420,8 +5420,8 @@ qemuDomainPinEmulator(virDomainPtr dom, */ if (virCgroupNewEmulator(priv->cgroup, false, &cgroup_emulator) < 0) goto endjob; - if (qemuSetupCgroupEmulatorPin(cgroup_emulator, - newVcpuPin[0]->cpumask) < 0) { + if (qemuSetupCgroupCpusetCpus(cgroup_emulator, + newVcpuPin[0]->cpumask) < 0) { virReportError(VIR_ERR_OPERATION_INVALID, "%s", _("failed to set cpuset.cpus in cgroup" " for emulator threads")); -- 2.2.2 -- libvir-list mailing list libvir-list@xxxxxxxxxx https://www.redhat.com/mailman/listinfo/libvir-list