提交 5378effd 编写于 作者: O Osier Yang

conf: Ignore emulatorpin if vcpu placement is auto

When vcpu placement is "auto", the domain process will be pinned
to advisory nodeset from querying numad, While emulatorpin will
override the pinning. That means both of them are to set the
pinning policy for domain process, but conflicts with each other.

This patch ingore emulatorpin if vcpu placement is "auto", because
<vcpu> placement can't be simply ignored for <numatune> placement
could default to it.
上级 0df1a790
......@@ -8880,19 +8880,27 @@ static virDomainDefPtr virDomainDefParseXML(virCapsPtr caps,
goto error;
}
/* Ignore emulatorpin if <vcpu> placement is "auto", they
* conflicts with each other, and <vcpu> placement can't be
* simply ignored, as <numatune>'s placement defaults to it.
*/
if (n) {
if (n > 1) {
virReportError(VIR_ERR_XML_ERROR, "%s",
_("only one emulatorpin is supported"));
VIR_FREE(nodes);
goto error;
}
if (def->placement_mode != VIR_DOMAIN_CPU_PLACEMENT_MODE_AUTO) {
if (n > 1) {
virReportError(VIR_ERR_XML_ERROR, "%s",
_("only one emulatorpin is supported"));
VIR_FREE(nodes);
goto error;
}
def->cputune.emulatorpin = virDomainVcpuPinDefParseXML(nodes[0], ctxt,
def->maxvcpus, 1);
def->cputune.emulatorpin = virDomainVcpuPinDefParseXML(nodes[0], ctxt,
def->maxvcpus, 1);
if (!def->cputune.emulatorpin)
goto error;
if (!def->cputune.emulatorpin)
goto error;
} else {
VIR_WARN("Ignore emulatorpin for <vcpu> placement is 'auto'");
}
}
VIR_FREE(nodes);
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册