true, &cgroup_vcpu) < 0)
goto cleanup;
- /* move the thread for vcpu to sub dir */
- if (virCgroupAddTask(cgroup_vcpu,
- qemuDomainGetVcpuPid(vm, i)) < 0)
- goto cleanup;
-
if (period || quota) {
if (qemuSetupCgroupVcpuBW(cgroup_vcpu, period, quota) < 0)
goto cleanup;
if (qemuSetupCgroupCpusetCpus(cgroup_vcpu, cpumap) < 0)
goto cleanup;
}
+
+ /* move the thread for vcpu to sub dir */
+ if (virCgroupAddTask(cgroup_vcpu,
+ qemuDomainGetVcpuPid(vm, i)) < 0)
+ goto cleanup;
+
}
virCgroupFree(&cgroup_vcpu);
VIR_FREE(mem_mask);
true, &cgroup_iothread) < 0)
goto cleanup;
- /* move the thread for iothread to sub dir */
- if (virCgroupAddTask(cgroup_iothread,
- def->iothreadids[i]->thread_id) < 0)
- goto cleanup;
-
if (period || quota) {
if (qemuSetupCgroupVcpuBW(cgroup_iothread, period, quota) < 0)
goto cleanup;
goto cleanup;
}
+ /* move the thread for iothread to sub dir */
+ if (virCgroupAddTask(cgroup_iothread,
+ def->iothreadids[i]->thread_id) < 0)
+ goto cleanup;
+
virCgroupFree(&cgroup_iothread);
}
VIR_FREE(mem_mask);