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

Re: [Xen-devel] [PATCH v4 03/15] libxl: introduce libxl_get_nr_cpus()



On mar, 2013-12-03 at 17:48 +0000, Ian Jackson wrote:
> Dario Faggioli writes ("[PATCH v4 03/15] libxl: introduce 
> libxl_get_nr_cpus()"):
> > to retrieve the actual number of pCPUs on the host.
> > 
> > Signed-off-by: Dario Faggioli <dario.faggioli@xxxxxxxxxx>
> > ---
> >  tools/libxl/libxl.h       |    3 +++
> >  tools/libxl/libxl_utils.c |   18 ++++++++++++++++++
> >  2 files changed, 21 insertions(+)
> > 
> > diff --git a/tools/libxl/libxl.h b/tools/libxl/libxl.h
> > index a9663e4..2fab5ba 100644
> > --- a/tools/libxl/libxl.h
> > +++ b/tools/libxl/libxl.h
> > @@ -652,6 +652,9 @@ int libxl_domain_preserve(libxl_ctx *ctx, uint32_t 
> > domid, libxl_domain_create_in
> >  /* get max. number of cpus supported by hypervisor */
> >  int libxl_get_max_cpus(libxl_ctx *ctx);
> >  
> > +/* get the actual number of online cpus on the host */
> > +int libxl_get_nr_cpus(libxl_ctx *ctx);
> 
> This number might be out of date as soon as it is read, won't it ?
> 
Quite possible, yes.

So, are you suggesting that we shouldn't even allow the user to read it?
Or that I should mention that in the comment? (Or something else?)

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