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

Re: [Xen-devel] [PATCH v3 3/6] xl: Make set_memory_target return an error code on failure



On Tue, 2015-12-01 at 11:53 +0000, George Dunlap wrote:
> Bring set_memory_target into line with set_memory_max (which does
> return an error code.
> 
> Signed-off-by: George Dunlap <george.dunlap@xxxxxxxxxxxxx>
> ---
> CC: Ian Campbell <ian.campbell@xxxxxxxxxx>
> CC: Ian Jackson <ian.jackson@xxxxxxxxxx>
> CC: Wei Liu <wei.liu2@xxxxxxxxxx>
> CC: Konrad Wilk <konrad.wilk@xxxxxxxxxx>
> ---
> Âtools/libxl/xl_cmdimpl.c | 17 +++++++++++++----
> Â1 file changed, 13 insertions(+), 4 deletions(-)
> 
> diff --git a/tools/libxl/xl_cmdimpl.c b/tools/libxl/xl_cmdimpl.c
> index 2ba2393..4455d73 100644
> --- a/tools/libxl/xl_cmdimpl.c
> +++ b/tools/libxl/xl_cmdimpl.c
> @@ -3297,9 +3297,10 @@ int main_memmax(int argc, char **argv)
> ÂÂÂÂÂreturn 0;
> Â}
> Â
> -static void set_memory_target(uint32_t domid, const char *mem)
> +static int set_memory_target(uint32_t domid, const char *mem)
> Â{
> -ÂÂÂÂlong long int memorykb;
> +ÂÂÂÂint64_t memorykb;

The switch from long long to int64_t here is just incidental, right?

It did cause me to notice that bothÂlibxl_set_memory_target
andÂlibxl_domain_setmaxmem take a 32bit (inconsistently signed vs unsigned)
argument for the memkb, so apart from the loss of range vs
parse_mem_size_kb you also can't set the target as high as you can set the
maximum. Nice.

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