[libvirt] [PATCH 4/6] qemu: vcpupin: Always set affinity even when cgroups are supported

Peter Krempa pkrempa at redhat.com
Fri Feb 19 13:09:43 UTC 2016


On Fri, Feb 19, 2016 at 07:19:38 -0500, John Ferlan wrote:
> 
> 
> On 02/17/2016 11:25 AM, Peter Krempa wrote:
> > VM startup and CPU hotplug always set the affinity regardless of cgroups
> > support. Use the same approach for the pinning API.
> > ---
> >  src/qemu/qemu_driver.c | 7 +++----
> >  1 file changed, 3 insertions(+), 4 deletions(-)
> > 
> > diff --git a/src/qemu/qemu_driver.c b/src/qemu/qemu_driver.c
> > index 24c1ca4..d1e5188 100644
> > --- a/src/qemu/qemu_driver.c
> > +++ b/src/qemu/qemu_driver.c
> > @@ -5068,12 +5068,11 @@ qemuDomainPinVcpuFlags(virDomainPtr dom,
> >                  goto endjob;
> >              if (qemuSetupCgroupCpusetCpus(cgroup_vcpu, pcpumap) < 0)
> >                  goto endjob;
> > -        } else {
> > -            if (virProcessSetAffinity(qemuDomainGetVcpuPid(vm, vcpu),
> > -                                      pcpumap) < 0)
> > -                goto endjob;
> >          }
> > 
> > +        if (virProcessSetAffinity(qemuDomainGetVcpuPid(vm, vcpu), pcpumap) < 0)
> > +            goto endjob;
> > +
> >          virBitmapFree(vcpuinfolive->cpumask);
> >          vcpuinfolive->cpumask = pcpumaplive;
> >          pcpumaplive = NULL;
> > 
> 
> Why not the same for qemuDomainPinEmulator and qemuDomainPinIOThread?

I'm too focused on the cpus in this series apparently ...

> Since qemuProcessSetEmulatorAffinity and qemuProcessSetupIOThread do the
> same as qemuProcessSetupVcpu.

Are you okay with separate patches for this?
-------------- 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/20160219/e5bac363/attachment-0001.sig>


More information about the libvir-list mailing list