[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 gio, 2014-06-19 at 18:42 +0100, Wei Liu wrote:
> 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.
> 
Ah, right, found it! Also, re-read the memory management stuff in
libxl.h, and it makes sense now.

Thanks (and sorry for the stupid question).

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)

Attachment: signature.asc
Description: This is a digitally signed message part

_______________________________________________
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®.