Re: [PATCH] qemu: fix wrong nodeset info when numatune placement is auto

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 




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@xxxxxxxxxx>
> ---
>  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.

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)
> 

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



[Index of Archives]     [Virt Tools]     [Libvirt Users]     [Lib OS Info]     [Fedora Users]     [Fedora Desktop]     [Fedora SELinux]     [Big List of Linux Books]     [Yosemite News]     [KDE Users]     [Fedora Tools]