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

Re: [Xen-devel] [PATCH 1/2] tools/libxc: Introduce XC_CPUPOOL_POOLID_ANY



On Wed, Feb 08, 2017 at 02:51:45PM +0000, George Dunlap wrote:
> Callers to xc_cpupool_create() can either request a specific pool id,
> or request that Xen do it for them.  But at the moment, the
> "automatic" selection is indicated by using a magic value, 0.  This is
> undesirable both because it doesn't obviously have meaning, but also
> because '0' is a valid cpupool (albeit one which at the moment can't
> be changed).
> 
> Introduce a constant, XC_CPUPOOL_POOLID_ANY, to indicate this instead.
> Have it be the default for the python bindings.
> 
> Manually translate it, even though it's the same underlying value,
> because we don't yet have a relaible way of enforcing that these
> values are the same.
> 
> Signed-off-by: George Dunlap <george.dunlap@xxxxxxxxxx>
> ---
> 
> I realize this is somewhat of a bike shed, but I want to avoid
> propagating this "magic number" interface into the xenlight bindings
> if I can.
> 
> Also, at some point we might use the IDL to enforce that the libxl
> values are identical to the Xen values, at which point we can just
> pass the value in directly.
> 

Acked-by: Wei Liu <wei.liu2@xxxxxxxxxx>

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

 


Rackspace

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