On 10/29/2015 04:54 AM, John Ferlan wrote:
On 10/12/2015 05:28 AM, Luyao Huang wrote:
>
https://bugzilla.redhat.com/show_bug.cgi?id=1270715
>
> Since commit 9deb96f remove check the nodeset from cgroup for
> a running vm, the numatune nodeset reporting for those guest
> numatune placement is auto is not right. Pass the autonodeset
> to virDomainNumatuneFormatNodeset() to fix this.
>
> Signed-off-by: Luyao Huang <lhuang(a)redhat.com>
> ---
> src/qemu/qemu_driver.c | 5 ++++-
> 1 file changed, 4 insertions(+), 1 deletion(-)
>
Seems reasonable - although perhaps the bug was introduced by commit id
'43b67f2e7' which added the call to virDomainNumatuneFormatNodeset if
the CpusetMems call fails. There's also some more history I put into
the commit message before pushing.
Nice commit message, thanks a lot for your help and review.
Luyao
John
> diff --git a/src/qemu/qemu_driver.c b/src/qemu/qemu_driver.c
> index 8cd5ee3..8ca55dd 100644
> --- a/src/qemu/qemu_driver.c
> +++ b/src/qemu/qemu_driver.c
> @@ -10177,6 +10177,7 @@ qemuDomainGetNumaParameters(virDomainPtr dom,
> size_t i;
> virDomainObjPtr vm = NULL;
> virDomainNumatuneMemMode tmpmode = VIR_DOMAIN_NUMATUNE_MEM_STRICT;
> + qemuDomainObjPrivatePtr priv;
> char *nodeset = NULL;
> int ret = -1;
> virDomainDefPtr def = NULL;
> @@ -10187,6 +10188,7 @@ qemuDomainGetNumaParameters(virDomainPtr dom,
>
> if (!(vm = qemuDomObjFromDomain(dom)))
> return -1;
> + priv = vm->privateData;
>
> if (virDomainGetNumaParametersEnsureACL(dom->conn, vm->def) < 0)
> goto cleanup;
> @@ -10214,7 +10216,8 @@ qemuDomainGetNumaParameters(virDomainPtr dom,
> break;
>
> case 1: /* fill numa nodeset here */
> - nodeset = virDomainNumatuneFormatNodeset(def->numa, NULL, -1);
> + nodeset = virDomainNumatuneFormatNodeset(def->numa,
> + priv->autoNodeset, -1);
> if (!nodeset ||
> virTypedParameterAssign(param, VIR_DOMAIN_NUMA_NODESET,
> VIR_TYPED_PARAM_STRING, nodeset) < 0)
>