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

Re: [Xen-devel] [PATCH 2/6] xl: Implement XENMEM_claim_pages support via 'claim_mode' global config



Ian Jackson writes ("Re: [PATCH 2/6] xl: Implement XENMEM_claim_pages support 
via 'claim_mode' global config"):
> Sorry, I just spotted this.  I think the libxl_defbool_setdefault
> shouldn't be there.  The defbool should be initialised to "default",
> which can be done by setting it to 0, as per:
> 
>   * To allow users of the library to naively select all defaults this
>   * state is represented as 0. False is < 0 and True is > 0.
> 
> in libxl.h.  And since it's a variable of static duration the C
> implementation will initialise it to 0.  So just deleting the
> setdefault is right.
> 
> The result is that the default is set in libxl, only.

Konrad points out that without this, xl can't easily find out whether
the claim mode is enabled or not.

Options are:

1. Leave it as it is, default set in libxl but overridden by
   separate setting in xl (perhaps we should add a comment).
   Tolerable.

2. Move the default setting out of libxl entirely, so callers
   must pass 0 or 1.  (I don't approve of this; we might want
   to change the behaviour of naive toolstacks in the future.)

3. Provide a new interface to libxl which allows the claim
   default to be retrieved.  Palaver.     

4. Have xl operations which need to know the default claim mode
   set up a dummy domain creation config, ask libxl to set the
   defaults in it, and then read out the value.  Very ugly.

Of these I prefer 1.  Opinions ?  Whatever we do needs to be in 4.3.

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