|
|
|
|
|
|
|
|
|
|
xen-devel
[Xen-devel] Re: how to change the memory size of a VM
I am looking into a problem that when the memory size of a VM is changed which part of the original memory is taken away by xen.
For example, if I change the memory size of a VM from 2048MB --> 1024MB, how can I tell which are the 1024M byte that will be taken away (I do not want the xen to take the memory spaces that are caching useful data).
The command for memory size reconfiguration is "xm mem-set", so I looked the source code of xm. It turned out to be the following python calls:
tools/python/xen/xm/main.py: setMemoryTarget(dom, mem_target)
tools/python/xen/xend/XendDomainInfo.py: setMemoryTarget: self._safe_set_memory('memory_dynamic_min', target * MiB)
self._safe_set_memory('memory_dynamic_max', target * MiB)
xen.xend.XendDomain.instance().managed_config_save(self)
tools/python/xen/xend/XendDomainInfo.py: _safe_set_memory
self.info[‘memory_dynamic_min’] = target self.info[‘memory_dynamic_max’] = target It seems that to change the memory size of a VM, you just need to save the new size in somewhere, xenstore?
How would the new size take effect? the memory mapping of the VM must be modified somewhere. Look forward to replies, sorry if the question is stupid, a newbie here ^_^ Thanks in advance
_______________________________________________
Xen-devel mailing list
Xen-devel@xxxxxxxxxxxxxxxxxxx
http://lists.xensource.com/xen-devel
|
|
|
|
|