Parameter name change for xc_*_build functions
RFC PATCH 1/1 Parameter name change for xc_*_build functions
[Purely a cosmetic change.]
It's been pointed out that the "memory" parameter names in tools/libxc/xenguest.h aren't very consistent between linux and HVM, and may confuse people setting up ballooning systems. Ballooning systems generally have a parameter like "static_max", which is the maximum memory the VM will ever have, and "target" which is the memory we want it to have right now (somewhere between dynamic_max and dynamic_min).
The attached patch changes the parameter names to make them consistent with what someone building such a system might use:
* When building a PV Linux VM, since we can expand the memory whenever we wish, we pass in "start_mem_mb". This corresponds to "target".
* When building an HVM VM with xc_hvm_build(), since we cannot grow larger than the initial amount of memory at boot, we pass in "max_mem_mb". This corresponds to "static_max". The balloon driver can then be used after boot to balloon down to target.
* When building an HVM VM with xc_hvm_build_target_mem(), we pass both
parameters: "max_mem_mb" (which corresponds to "static_max") and "start_mem_mb" (which corresponds to target).
Thoughts?
-George Dunlap
tools/libxc/xenguest.h +9 -9
@@ -53,7 +53,7 @@* * @parm xc_handle a handle to an open hypervisor interface * @parm domid the id of the domain -* @parm mem_mb memory size in megabytes +* @parm start_mem_mb initial memory size in megabytes * @parm image_name name of the kernel image file * @parm ramdisk_name name of the ramdisk image file * @parm cmdline command line string
@@ -66,7 +66,7 @@*/ int xc_linux_build(int xc_handle, uint32_t domid, - unsigned int mem_mb, + unsigned int start_mem_mb, const char *image_name, const char *ramdisk_name, const char *cmdline,
@@ -82,7 +82,7 @@ int xc_dom_linux_build(int xc_handle, struct xc_dom_image *dom, uint32_t domid, - unsigned int mem_mb, + unsigned int start_mem_mb, const char *image_name, const char *ramdisk_name, unsigned long flags,
@@ -97,7 +97,7 @@* * @parm xc_handle a handle to an open hypervisor interface * @parm domid the id of the domain -* @parm mem_mb memory size in megabytes +* @parm start_mem_mb memory size in megabytes * @parm image_buffer buffer containing kernel image * @parm image_size size of the kernel image buffer * @parm initrd_buffer name of the ramdisk image file
@@ -112,7 +112,7 @@*/ int xc_linux_build_mem(int xc_handle, uint32_t domid, - unsigned int mem_mb, + unsigned int start_mem_mb, const char *image_buffer, unsigned long image_size, const char *initrd_buffer,
@@ -127,18 +127,18 @@int xc_hvm_build (int xc_handle,uint32_t domid, -int memsize, +int max_mem_mb,const char *image_name);int xc_hvm_build_target_mem (int xc_handle,uint32_t domid, -int memsize, -int target, +int max_mem_mb, +int start_mem_mb,const char *image_name);int xc_hvm_build_mem (int xc_handle,uint32_t domid, -int memsize, +int max_mem_mb,const char *image_buffer,unsigned long image_size);
_______________________________________________
Xen-devel mailing list
[email protected]
http://lists.xensource.com/xen-devel