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:
Jiri Denemark 2010-04-21 09:39:49 +02:00
parent 871aa6e3c1
commit 9fbb810cf4

View File

@ -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 &&