mirror of
https://gitlab.com/libvirt/libvirt.git
synced 2024-12-31 10:05:31 +00:00
qemu: Allow VIR_DOMAIN_NUMATUNE_MEM_RESTRICTIVE in qemuDomainSetNumaParamsLive()
The whole idea of VIR_DOMAIN_NUMATUNE_MEM_RESTRICTIVE is that the memory location is restricted only via CGroups and thus can be changed on the fly (which is exactly what qemuDomainSetNumaParamsLive() does. Allow this mode there then. Signed-off-by: Michal Privoznik <mprivozn@redhat.com> Reviewed-by: Pavel Hrdina <phrdina@redhat.com>
This commit is contained in:
parent
dfd1ffc544
commit
a19b93d4e0
@ -1127,6 +1127,9 @@ NUMA Node Tuning
|
||||
will be ignored if it's specified. If ``placement`` of ``vcpu`` is 'auto',
|
||||
and ``numatune`` is not specified, a default ``numatune`` with ``placement``
|
||||
'auto' and ``mode`` 'strict' will be added implicitly. :since:`Since 0.9.3`
|
||||
See `virDomainSetNumaParameters
|
||||
<html/libvirt-libvirt-domain.html#virDomainSetNumaParameters>`__ for more
|
||||
information on update of this element.
|
||||
``memnode``
|
||||
Optional ``memnode`` elements can specify memory allocation policies per each
|
||||
guest NUMA node. For those nodes having no corresponding ``memnode`` element,
|
||||
|
@ -3549,7 +3549,7 @@ displayed.
|
||||
\'restrictive' or any valid number from the virDomainNumatuneMemMode enum
|
||||
in case the daemon supports it. For a running domain, the mode can't be
|
||||
changed, and the nodeset can be changed only if the domain was started with
|
||||
a mode of \`strict'.
|
||||
a mode of either \`strict' or \`restrictive'.
|
||||
|
||||
*nodeset* is a list of numa nodes used by the host for running the domain.
|
||||
Its syntax is a comma separated list, with '-' for ranges and '^' for
|
||||
|
@ -2182,6 +2182,14 @@ virDomainGetMemoryParameters(virDomainPtr domain,
|
||||
* Change all or a subset of the numa tunables.
|
||||
* This function may require privileged access to the hypervisor.
|
||||
*
|
||||
* Changing live configuration may be possible only in some cases. For
|
||||
* instance, for QEMU driver the mode (VIR_DOMAIN_NUMA_MODE) can not be
|
||||
* changed, and changing the nodeset (VIR_DOMAIN_NUMA_NODESET) is possible
|
||||
* only for VIR_DOMAIN_NUMATUNE_MEM_STRICT and
|
||||
* VIR_DOMAIN_NUMATUNE_MEM_RESTRICTIVE modes.
|
||||
*
|
||||
* Changing persistent configuration does not pose such limitations.
|
||||
*
|
||||
* Returns -1 in case of error, 0 in case of success.
|
||||
*/
|
||||
int
|
||||
|
@ -8777,10 +8777,10 @@ qemuDomainSetNumaParamsLive(virDomainObj *vm,
|
||||
size_t i = 0;
|
||||
|
||||
if (virDomainNumatuneGetMode(vm->def->numa, -1, &mode) == 0 &&
|
||||
mode != VIR_DOMAIN_NUMATUNE_MEM_STRICT) {
|
||||
mode != VIR_DOMAIN_NUMATUNE_MEM_STRICT &&
|
||||
mode != VIR_DOMAIN_NUMATUNE_MEM_RESTRICTIVE) {
|
||||
virReportError(VIR_ERR_OPERATION_INVALID, "%s",
|
||||
_("change of nodeset for running domain "
|
||||
"requires strict numa mode"));
|
||||
_("change of nodeset for running domain requires strict or restrictive numa mode"));
|
||||
return -1;
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user