On 08/24/2015 08:52 PM, Martin Kletzander wrote:
On Fri, Aug 14, 2015 at 05:37:28PM +0800, Luyao Huang wrote:
We will try to set the node to cpuset.mems without check if
it is available, since we already have helper to check this.
Call virNumaNodesetIsAvailable to check if node is available,
then try to change it in the cgroup.

Signed-off-by: Luyao Huang <lhu...@redhat.com>
---
src/qemu/qemu_driver.c | 3 +++
1 file changed, 3 insertions(+)


ACK, will push in a while.


Thanks a lot for your review.

Luyao

diff --git a/src/qemu/qemu_driver.c b/src/qemu/qemu_driver.c
index fa655b5..45dfca0 100644
--- a/src/qemu/qemu_driver.c
+++ b/src/qemu/qemu_driver.c
@@ -9977,6 +9977,9 @@ qemuDomainSetNumaParamsLive(virDomainObjPtr vm,
        goto cleanup;
    }

+    if (!virNumaNodesetIsAvailable(nodeset))
+        goto cleanup;
+
    /* Ensure the cpuset string is formatted before passing to cgroup */
    if (!(nodeset_str = virBitmapFormat(nodeset)))
        goto cleanup;
--
1.8.3.1

--
libvir-list mailing list
libvir-list@redhat.com
https://www.redhat.com/mailman/listinfo/libvir-list

--
libvir-list mailing list
libvir-list@redhat.com
https://www.redhat.com/mailman/listinfo/libvir-list

Reply via email to