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

Re: [Xen-devel] [PATCH 03 of 10 v2] libxl, libxc: introduce libxl_get_numainfo()



> > > diff --git a/tools/libxl/libxl_utils.c b/tools/libxl/libxl_utils.c
> > > --- a/tools/libxl/libxl_utils.c
> > > +++ b/tools/libxl/libxl_utils.c
> > > @@ -537,6 +537,11 @@ int libxl_get_max_cpus(libxl_ctx *ctx)
> > >      return xc_get_max_cpus(ctx->xch);
> > >  }
> > >  
> > > +int libxl_get_max_nodes(libxl_ctx *ctx)
> > > +{
> > > +    return xc_get_max_nodes(ctx->xch);
> > > +}
> > 
> > Is this needed externally to libxl or do we expect all callers to use
> > libxl_get_numainfo? I suppose there is no harm in exporting this either
> > way.
> > 
> I'm not sure. What I did is to replicate what happens for
> libxl_get_max_cpus(), but I really don't know whether or not they both
> make any sense outside libxl. It does not look that bad to me that we
> offer our users a chance to figure out how many cpus and/or nodes they
> have, without needing to call the proper libxl_get_*info(), which is
> quite a bit more of a burden. FWIW, I'd leave both of them public.

OK.

> > > diff --git a/xen/include/public/sysctl.h b/xen/include/public/sysctl.h
> > > --- a/xen/include/public/sysctl.h
> > > +++ b/xen/include/public/sysctl.h
> > > @@ -484,6 +484,7 @@ typedef struct xen_sysctl_topologyinfo x
> > >  DEFINE_XEN_GUEST_HANDLE(xen_sysctl_topologyinfo_t);
> > >  
> > >  /* XEN_SYSCTL_numainfo */
> > > +#define INVALID_NUMAINFO_ID (~0U)
> > 
> > It feels like there ought to be hunks in the hypervisor which either use
> > this symbol instead of a hardcoded ~0U or which remove the internal
> > definition in favour of this one?
> > 
> Again, -topologyinfo machinery does exactly this, so I really think we
> either fix/change or leave as they are both of them (which of course I
> can do, just tell me if that is what you want).

Lets leave it as is then.

Ian.



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