提交 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,
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,14 +968,14 @@ 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,
qemuSetupCgroupCpusetCpus(virCgroupPtr cgroup,
virBitmapPtr cpumask)
{
int ret = -1;
......@@ -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;
}
......
......@@ -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,
......
......@@ -5427,7 +5427,7 @@ qemuDomainPinEmulator(virDomainPtr dom,
*/
if (virCgroupNewEmulator(priv->cgroup, false, &cgroup_emulator) < 0)
goto endjob;
if (qemuSetupCgroupEmulatorPin(cgroup_emulator,
if (qemuSetupCgroupCpusetCpus(cgroup_emulator,
newVcpuPin[0]->cpumask) < 0) {
virReportError(VIR_ERR_OPERATION_INVALID, "%s",
_("failed to set cpuset.cpus in cgroup"
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册