linux内核已经实现了内存热插的支持,当一个linux系统不管运行在 物理环境 或者虚拟环境 时只要宿主能提供内存热插拔机制,linux内核就能相应的增加或者减少内存。
目前已知的VMware已经可以做到内存热插。
改变内存容量有两种方式:
40 1.1 purpose of memory hotplug
41 ------------
42 Memory Hotplug allows users to increase/decrease the amount of memory.
43 Generally, there are two purposes.
44
45 (A) For changing the amount of memory.
46 This is to allow a feature like capacity on demand.
47 (B) For installing/removing DIMMs or NUMA-nodes physically.
48 This is to exchange DIMMs/NUMA-nodes, reduce power consumption, etc.
前些天检查maillist时发现已经有人实现了DIMMs 方式更改内存大小。这种方式还没有并入mainline tree。
https://github.com/vliaskov/seabios/commits/memhp-v3-alt
https://github.com/vliaskov/qemu-kvm/commits/memhp-v3-alt
可以测试下: