Re: [libvirt] [PATCH 6/6] qemu: fix set vcpus on host without NUMA

2015-03-24 Thread Pavel Hrdina
On Tue, Mar 24, 2015 at 05:38:37PM +0100, Peter Krempa wrote:
> On Fri, Mar 20, 2015 at 15:39:04 +0100, Pavel Hrdina wrote:
> > We don't have to modify cpuset.mems on hosts without NUMA.  It also
> > fixes an error message that you get instead of success if you trying
> > update vcpus of a guest on a host without NUMA.
> 
> Could you add example of the error you are fixing here?

Sure

> 
> > 
> > Signed-off-by: Pavel Hrdina 
> > ---
> >  src/qemu/qemu_driver.c | 3 ++-
> >  1 file changed, 2 insertions(+), 1 deletion(-)
> > 
> > diff --git a/src/qemu/qemu_driver.c b/src/qemu/qemu_driver.c
> > index c4d96bd..eb86d68 100644
> > --- a/src/qemu/qemu_driver.c
> > +++ b/src/qemu/qemu_driver.c
> > @@ -4889,7 +4889,8 @@ qemuDomainSetVcpusFlags(virDomainPtr dom, unsigned 
> > int nvcpus,
> >  }
> >  }
> >  
> > -if (flags & VIR_DOMAIN_AFFECT_LIVE && !(flags & 
> > VIR_DOMAIN_VCPU_GUEST)) {
> > +if (flags & VIR_DOMAIN_AFFECT_LIVE && !(flags & VIR_DOMAIN_VCPU_GUEST) 
> > &&
> > +virNumaIsAvailable()) {
> >  if (virCgroupNewEmulator(priv->cgroup, false, &cgroup_temp) < 0)
> >  goto endjob;
> 
> ACK. 
> 
> Peter

Thanks, will push it shortly.

Pavel

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


Re: [libvirt] [PATCH 6/6] qemu: fix set vcpus on host without NUMA

2015-03-24 Thread Peter Krempa
On Fri, Mar 20, 2015 at 15:39:04 +0100, Pavel Hrdina wrote:
> We don't have to modify cpuset.mems on hosts without NUMA.  It also
> fixes an error message that you get instead of success if you trying
> update vcpus of a guest on a host without NUMA.

Could you add example of the error you are fixing here?

> 
> Signed-off-by: Pavel Hrdina 
> ---
>  src/qemu/qemu_driver.c | 3 ++-
>  1 file changed, 2 insertions(+), 1 deletion(-)
> 
> diff --git a/src/qemu/qemu_driver.c b/src/qemu/qemu_driver.c
> index c4d96bd..eb86d68 100644
> --- a/src/qemu/qemu_driver.c
> +++ b/src/qemu/qemu_driver.c
> @@ -4889,7 +4889,8 @@ qemuDomainSetVcpusFlags(virDomainPtr dom, unsigned int 
> nvcpus,
>  }
>  }
>  
> -if (flags & VIR_DOMAIN_AFFECT_LIVE && !(flags & VIR_DOMAIN_VCPU_GUEST)) {
> +if (flags & VIR_DOMAIN_AFFECT_LIVE && !(flags & VIR_DOMAIN_VCPU_GUEST) &&
> +virNumaIsAvailable()) {
>  if (virCgroupNewEmulator(priv->cgroup, false, &cgroup_temp) < 0)
>  goto endjob;

ACK. 

Peter


signature.asc
Description: Digital signature
--
libvir-list mailing list
libvir-list@redhat.com
https://www.redhat.com/mailman/listinfo/libvir-list

[libvirt] [PATCH 6/6] qemu: fix set vcpus on host without NUMA

2015-03-20 Thread Pavel Hrdina
We don't have to modify cpuset.mems on hosts without NUMA.  It also
fixes an error message that you get instead of success if you trying
update vcpus of a guest on a host without NUMA.

Signed-off-by: Pavel Hrdina 
---
 src/qemu/qemu_driver.c | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

diff --git a/src/qemu/qemu_driver.c b/src/qemu/qemu_driver.c
index c4d96bd..eb86d68 100644
--- a/src/qemu/qemu_driver.c
+++ b/src/qemu/qemu_driver.c
@@ -4889,7 +4889,8 @@ qemuDomainSetVcpusFlags(virDomainPtr dom, unsigned int 
nvcpus,
 }
 }
 
-if (flags & VIR_DOMAIN_AFFECT_LIVE && !(flags & VIR_DOMAIN_VCPU_GUEST)) {
+if (flags & VIR_DOMAIN_AFFECT_LIVE && !(flags & VIR_DOMAIN_VCPU_GUEST) &&
+virNumaIsAvailable()) {
 if (virCgroupNewEmulator(priv->cgroup, false, &cgroup_temp) < 0)
 goto endjob;
 
-- 
2.0.5

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