mirror of
https://gitlab.com/libvirt/libvirt.git
synced 2025-02-24 20:32:22 +00:00
Fix initial VCPU pinning in qemu driver
First, inital VCPU pinning is set correctly but then it is reset by assigning qemu process to a new cgroup (which contains all CPUs). It's easily fixed by swapping these two actions.
This commit is contained in:
parent
871aa6e3c1
commit
9fbb810cf4
@ -3081,10 +3081,12 @@ static int qemudSecurityHook(void *data) {
|
|||||||
/* This must take place before exec(), so that all QEMU
|
/* This must take place before exec(), so that all QEMU
|
||||||
* memory allocation is on the correct NUMA node
|
* memory allocation is on the correct NUMA node
|
||||||
*/
|
*/
|
||||||
if (qemudInitCpuAffinity(h->vm) < 0)
|
if (qemuAddToCgroup(h->driver, h->vm->def) < 0)
|
||||||
return -1;
|
return -1;
|
||||||
|
|
||||||
if (qemuAddToCgroup(h->driver, h->vm->def) < 0)
|
/* This must be done after cgroup placement to avoid resetting CPU
|
||||||
|
* affinity */
|
||||||
|
if (qemudInitCpuAffinity(h->vm) < 0)
|
||||||
return -1;
|
return -1;
|
||||||
|
|
||||||
if (h->driver->securityDriver &&
|
if (h->driver->securityDriver &&
|
||||||
|
Loading…
x
Reference in New Issue
Block a user