[libvirt] [PATCH v2 2/3] lxc controller: add check for numatune

Martin Kletzander mkletzan at redhat.com
Wed Oct 29 07:00:29 UTC 2014


On Tue, Oct 28, 2014 at 04:22:22PM +0800, Chen Fan wrote:
>Signed-off-by: Chen Fan <chen.fan.fnst at cn.fujitsu.com>
>---
> src/lxc/lxc_controller.c | 3 ++-
> 1 file changed, 2 insertions(+), 1 deletion(-)
>
>diff --git a/src/lxc/lxc_controller.c b/src/lxc/lxc_controller.c
>index 1861dd6..1ee89ab 100644
>--- a/src/lxc/lxc_controller.c
>+++ b/src/lxc/lxc_controller.c
>@@ -689,7 +689,8 @@ static int virLXCControllerSetupResourceLimits(virLXCControllerPtr ctrl)
>     int ret = -1;
>
>     if (virLXCControllerGetNumadAdvice(ctrl, &nodemask) < 0 ||
>-        virNumaSetupMemoryPolicy(ctrl->def->numatune, nodemask) < 0)
>+        (virNumaNodesetIsAvailable (ctrl->def->numatune) &&
>+         virNumaSetupMemoryPolicy(ctrl->def->numatune, nodemask) < 0))
>         goto cleanup;
>

This would mean it will succeed if the numa node is not available on
the host.  Don't you want to error out?  By the way, it would make
sense to make the check in virNumaSetupMemoryPolicy() itself.

Martin
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 819 bytes
Desc: Digital signature
URL: <http://listman.redhat.com/archives/libvir-list/attachments/20141029/aa20eaba/attachment-0001.sig>


More information about the libvir-list mailing list