summaryrefslogtreecommitdiff
path: root/src/ch
diff options
context:
space:
mode:
authorMichal Privoznik <mprivozn@redhat.com>2022-04-01 14:30:05 +0200
committerMichal Privoznik <mprivozn@redhat.com>2022-04-07 12:12:11 +0200
commit629282d8845407c1aff9a26f5dc026e15121f8cd (patch)
tree167c70899474842551c02c8b959e9a7180479900 /src/ch
parent5c6622eff771767d37631675fb8b81ba95f0cc14 (diff)
downloadlibvirt-629282d8845407c1aff9a26f5dc026e15121f8cd.tar.gz
lib: Set up cpuset controller for restrictive numatune
The aim of 'restrictive' numatune mode is to rely solely on CGroups to have QEMU running on configured NUMA nodes. However, we were never setting the cpuset controller when a domain was starting up. We are doing so only when virDomainSetNumaParameters() is called (aka live pinning). This is obviously wrong. Fortunately, fix is simple as 'restrictive' is similar to 'strict' - every location where VIR_DOMAIN_NUMATUNE_MEM_STRICT occurs can be audited and VIR_DOMAIN_NUMATUNE_MEM_RESTRICTIVE case can be added. Resolves: https://bugzilla.redhat.com/show_bug.cgi?id=2070380 Signed-off-by: Michal Privoznik <mprivozn@redhat.com> Reviewed-by: Ján Tomko <jtomko@redhat.com>
Diffstat (limited to 'src/ch')
-rw-r--r--src/ch/ch_process.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/src/ch/ch_process.c b/src/ch/ch_process.c
index 785e4f8769..977082d585 100644
--- a/src/ch/ch_process.c
+++ b/src/ch/ch_process.c
@@ -254,7 +254,8 @@ virCHProcessSetupPid(virDomainObj *vm,
virCgroupHasController(priv->cgroup, VIR_CGROUP_CONTROLLER_CPUSET)) {
if (virDomainNumatuneGetMode(vm->def->numa, -1, &mem_mode) == 0 &&
- mem_mode == VIR_DOMAIN_NUMATUNE_MEM_STRICT &&
+ (mem_mode == VIR_DOMAIN_NUMATUNE_MEM_STRICT ||
+ mem_mode == VIR_DOMAIN_NUMATUNE_MEM_RESTRICTIVE) &&
virDomainNumatuneMaybeFormatNodeset(vm->def->numa,
priv->autoNodeset,
&mem_mask, -1) < 0)