Remove redundant lines in src/qemu/qemu_driver.c
maxcpu and hostcpus are defined and calculated in qemudDomainPinVcpuFlags() and qemudDomainPinEmulator(), but never used. So remove them including nodeinfo. Signed-off-by: Tang Chen <tangchen@cn.fujitsu.com>
This commit is contained in:
parent
f8b08d0e96
commit
9ce64e6aae
@ -3712,8 +3712,6 @@ qemudDomainPinVcpuFlags(virDomainPtr dom,
|
|||||||
virDomainDefPtr persistentDef = NULL;
|
virDomainDefPtr persistentDef = NULL;
|
||||||
virCgroupPtr cgroup_dom = NULL;
|
virCgroupPtr cgroup_dom = NULL;
|
||||||
virCgroupPtr cgroup_vcpu = NULL;
|
virCgroupPtr cgroup_vcpu = NULL;
|
||||||
int maxcpu, hostcpus;
|
|
||||||
virNodeInfo nodeinfo;
|
|
||||||
int ret = -1;
|
int ret = -1;
|
||||||
qemuDomainObjPrivatePtr priv;
|
qemuDomainObjPrivatePtr priv;
|
||||||
bool doReset = false;
|
bool doReset = false;
|
||||||
@ -3749,13 +3747,6 @@ qemudDomainPinVcpuFlags(virDomainPtr dom,
|
|||||||
goto cleanup;
|
goto cleanup;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (nodeGetInfo(dom->conn, &nodeinfo) < 0)
|
|
||||||
goto cleanup;
|
|
||||||
hostcpus = VIR_NODEINFO_MAXCPUS(nodeinfo);
|
|
||||||
maxcpu = maplen * 8;
|
|
||||||
if (maxcpu > hostcpus)
|
|
||||||
maxcpu = hostcpus;
|
|
||||||
|
|
||||||
pcpumap = virBitmapNewData(cpumap, maplen);
|
pcpumap = virBitmapNewData(cpumap, maplen);
|
||||||
if (!pcpumap)
|
if (!pcpumap)
|
||||||
goto cleanup;
|
goto cleanup;
|
||||||
@ -3995,8 +3986,6 @@ qemudDomainPinEmulator(virDomainPtr dom,
|
|||||||
virCgroupPtr cgroup_emulator = NULL;
|
virCgroupPtr cgroup_emulator = NULL;
|
||||||
pid_t pid;
|
pid_t pid;
|
||||||
virDomainDefPtr persistentDef = NULL;
|
virDomainDefPtr persistentDef = NULL;
|
||||||
int maxcpu, hostcpus;
|
|
||||||
virNodeInfo nodeinfo;
|
|
||||||
int ret = -1;
|
int ret = -1;
|
||||||
qemuDomainObjPrivatePtr priv;
|
qemuDomainObjPrivatePtr priv;
|
||||||
bool doReset = false;
|
bool doReset = false;
|
||||||
@ -4025,13 +4014,6 @@ qemudDomainPinEmulator(virDomainPtr dom,
|
|||||||
|
|
||||||
priv = vm->privateData;
|
priv = vm->privateData;
|
||||||
|
|
||||||
if (nodeGetInfo(dom->conn, &nodeinfo) < 0)
|
|
||||||
goto cleanup;
|
|
||||||
hostcpus = VIR_NODEINFO_MAXCPUS(nodeinfo);
|
|
||||||
maxcpu = maplen * 8;
|
|
||||||
if (maxcpu > hostcpus)
|
|
||||||
maxcpu = hostcpus;
|
|
||||||
|
|
||||||
pcpumap = virBitmapNewData(cpumap, maplen);
|
pcpumap = virBitmapNewData(cpumap, maplen);
|
||||||
if (!pcpumap)
|
if (!pcpumap)
|
||||||
goto cleanup;
|
goto cleanup;
|
||||||
|
Loading…
x
Reference in New Issue
Block a user