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

Re: [Xen-devel] [PATCH v9 9/9] libxl: automatic NUMA placement affects soft affinity



On Thu, Jun 19, 2014 at 07:33:50PM +0200, Dario Faggioli wrote:
[...]
> > -        rc = numa_place_domain(gc, domid, info);
> > +        rc = libxl_cpu_bitmap_alloc(ctx, &cpumap_soft, 0);
> >          if (rc)
> >              return rc;
> > +
> > +        rc = numa_place_domain(gc, domid, info);
> > +        if (rc) {
> > +            libxl_bitmap_dispose(&cpumap_soft);
> > +            return rc;
> > +        }
> > +
> >
> Do I need this call to libxl_bitmap_dispose(), to avoid leaking what
> libxl_cpu_bitmap_alloc() did upon return, or does libxl cleans this up
> for me? :-)
> 
> As you can see, I'm talking about the case where I'm inside libxl (i.e.,
> within libxl__build_pre() )
> 

Yes, you need to call _dispose. The bitmap is allocated with NOGC so
libxl won't free that for you.

And I think there's other occurences of this pattern in libxl as well.

Wei.

> Thanks and Regards,
> Dario
> 
> -- 
> <<This happens because I choose it to happen!>> (Raistlin Majere)
> -----------------------------------------------------------------
> Dario Faggioli, Ph.D, http://about.me/dario.faggioli
> Senior Software Engineer, Citrix Systems R&D Ltd., Cambridge (UK)
> 



_______________________________________________
Xen-devel mailing list
Xen-devel@xxxxxxxxxxxxx
http://lists.xen.org/xen-devel


 


Rackspace

Lists.xenproject.org is hosted with RackSpace, monitoring our
servers 24x7x365 and backed by RackSpace's Fanatical Support®.