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

Re: [libvirt] [PATCH 0/5] RFC: configure inactive domains' maximum memory size



On Fri, Mar 18, 2011 at 11:25:42AM +0900, Taku Izumi wrote:
> Hi all,
> 
> This patchset enables us to configure inactive domain's maximum memory
> size.
> 
> The basic technique is the same as that of "virsh setmem" command.
>  => http://www.redhat.com/archives/libvir-list/2011-March/msg00013.html
> 
>  *[PATCH 1/5] [RESEND] setmaxmem: remove the code to invoke virDomainSetMemory in
> cmdSetmaxmem
>     => http://www.redhat.com/archives/libvir-list/2011-March/msg00747.html
>  *[PATCH 2/5] setmaxmem: introduce a new libvirt API (virDomainSetMaxMemoryFlags)
>  *[PATCH 3/5] setmaxmem: implement the code to address the new API in the qemu driver
>  *[PATCH 4/5] setmaxmem: implement the remote protocol to address the new API
>  *[PATCH 5/5] setmaxmem: add the new options to "virsh setmaxmem" command

  Rather than add a new API, now that we have virDomainSetMemoryFlags()
I don't see why we could not use and extra flag on that API,
VIR_DOMAIN_MAX_MEM and use the same entry point.

  virDomainSetMaxMemory and virDomainSetMemory are separate because we
didn't add a flag for them, that was a mistake, but now we can
tunnel maximum memory changes though virDomainSetMemoryFlags()

  We would then allow
VIR_DOMAIN_MEM_LIVE -> change live memory target
VIR_DOMAIN_MEM_CONFIG -> change memory target on config i.e. next reboot
VIR_DOMAIN_MEM_LIVE | VIR_DOMAIN_MAX_MEM -> change live max memory (if feasible)
VIR_DOMAIN_MEM_CONFIG | VIR_DOMAIN_MAX_MEM -> change max memory on config

Adding more API may lead to more confusion than one API with all various
cases explained at a single place.

Daniel

-- 
Daniel Veillard      | libxml Gnome XML XSLT toolkit  http://xmlsoft.org/
daniel veillard com  | Rpmfind RPM search engine http://rpmfind.net/
http://veillard.com/ | virtualization library  http://libvirt.org/


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