提交 55072593 编写于 作者: P Peter Krempa

qemu: cgroup: Rename qemuSetupCgroupEmulatorPin to qemuSetupCgroupCpusetCpus

The function is used to set cpuset.cpus in various other helpers.
上级 98f08aba
...@@ -952,7 +952,7 @@ qemuSetupCgroupVcpuPin(virCgroupPtr cgroup, ...@@ -952,7 +952,7 @@ qemuSetupCgroupVcpuPin(virCgroupPtr cgroup,
for (i = 0; i < nvcpupin; i++) { for (i = 0; i < nvcpupin; i++) {
if (vcpuid == vcpupin[i]->id) if (vcpuid == vcpupin[i]->id)
return qemuSetupCgroupEmulatorPin(cgroup, vcpupin[i]->cpumask); return qemuSetupCgroupCpusetCpus(cgroup, vcpupin[i]->cpumask);
} }
return -1; return -1;
...@@ -968,14 +968,14 @@ qemuSetupCgroupIOThreadsPin(virCgroupPtr cgroup, ...@@ -968,14 +968,14 @@ qemuSetupCgroupIOThreadsPin(virCgroupPtr cgroup,
for (i = 0; i < niothreadspin; i++) { for (i = 0; i < niothreadspin; i++) {
if (iothreadid == iothreadspin[i]->id) if (iothreadid == iothreadspin[i]->id)
return qemuSetupCgroupEmulatorPin(cgroup, iothreadspin[i]->cpumask); return qemuSetupCgroupCpusetCpus(cgroup, iothreadspin[i]->cpumask);
} }
return -1; return -1;
} }
int int
qemuSetupCgroupEmulatorPin(virCgroupPtr cgroup, qemuSetupCgroupCpusetCpus(virCgroupPtr cgroup,
virBitmapPtr cpumask) virBitmapPtr cpumask)
{ {
int ret = -1; int ret = -1;
...@@ -1078,7 +1078,7 @@ qemuSetupCgroupForVcpu(virDomainObjPtr vm) ...@@ -1078,7 +1078,7 @@ qemuSetupCgroupForVcpu(virDomainObjPtr vm)
if (!cpumap) if (!cpumap)
continue; continue;
if (qemuSetupCgroupEmulatorPin(cgroup_vcpu, cpumap) < 0) if (qemuSetupCgroupCpusetCpus(cgroup_vcpu, cpumap) < 0)
goto cleanup; goto cleanup;
} }
...@@ -1142,7 +1142,7 @@ qemuSetupCgroupForEmulator(virDomainObjPtr vm) ...@@ -1142,7 +1142,7 @@ qemuSetupCgroupForEmulator(virDomainObjPtr vm)
if (cpumask) { if (cpumask) {
if (virCgroupHasController(priv->cgroup, VIR_CGROUP_CONTROLLER_CPUSET) && if (virCgroupHasController(priv->cgroup, VIR_CGROUP_CONTROLLER_CPUSET) &&
qemuSetupCgroupEmulatorPin(cgroup_emulator, cpumask) < 0) qemuSetupCgroupCpusetCpus(cgroup_emulator, cpumask) < 0)
goto cleanup; goto cleanup;
} }
...@@ -1252,7 +1252,7 @@ qemuSetupCgroupForIOThreads(virDomainObjPtr vm) ...@@ -1252,7 +1252,7 @@ qemuSetupCgroupForIOThreads(virDomainObjPtr vm)
} }
if (cpumask && if (cpumask &&
qemuSetupCgroupEmulatorPin(cgroup_iothread, cpumask) < 0) qemuSetupCgroupCpusetCpus(cgroup_iothread, cpumask) < 0)
goto cleanup; goto cleanup;
} }
......
...@@ -56,7 +56,7 @@ int qemuSetupCgroupVcpuPin(virCgroupPtr cgroup, ...@@ -56,7 +56,7 @@ int qemuSetupCgroupVcpuPin(virCgroupPtr cgroup,
virDomainPinDefPtr *vcpupin, virDomainPinDefPtr *vcpupin,
int nvcpupin, int nvcpupin,
int vcpuid); int vcpuid);
int qemuSetupCgroupEmulatorPin(virCgroupPtr cgroup, virBitmapPtr cpumask); int qemuSetupCgroupCpusetCpus(virCgroupPtr cgroup, virBitmapPtr cpumask);
int qemuSetupCgroupIOThreadsPin(virCgroupPtr cgroup, int qemuSetupCgroupIOThreadsPin(virCgroupPtr cgroup,
virDomainPinDefPtr *iothreadspin, virDomainPinDefPtr *iothreadspin,
int niothreadspin, int niothreadspin,
......
...@@ -5427,7 +5427,7 @@ qemuDomainPinEmulator(virDomainPtr dom, ...@@ -5427,7 +5427,7 @@ qemuDomainPinEmulator(virDomainPtr dom,
*/ */
if (virCgroupNewEmulator(priv->cgroup, false, &cgroup_emulator) < 0) if (virCgroupNewEmulator(priv->cgroup, false, &cgroup_emulator) < 0)
goto endjob; goto endjob;
if (qemuSetupCgroupEmulatorPin(cgroup_emulator, if (qemuSetupCgroupCpusetCpus(cgroup_emulator,
newVcpuPin[0]->cpumask) < 0) { newVcpuPin[0]->cpumask) < 0) {
virReportError(VIR_ERR_OPERATION_INVALID, "%s", virReportError(VIR_ERR_OPERATION_INVALID, "%s",
_("failed to set cpuset.cpus in cgroup" _("failed to set cpuset.cpus in cgroup"
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册