Commit Graph

11 Commits

Author SHA1 Message Date
Alexandre Derumier
f612bd67f2 numaX : use cpus option multiple time if cpulist
Signed-off-by: Alexandre Derumier <aderumier@odiso.com>
2016-10-10 10:16:37 +02:00
Wolfgang Bumiller
aaff69ad50 memory: hugepages: map numa node IDs to host and guest correctly
foreach_dimm() provides a guest numa node index, when used
in conjunction with the guest-to-host numa node topology
mapping one has to make sure that the correct host-side
indices are used.

This covers situations where the user defines a numaX with
hostnodes=Y with Y != X.

For instance:
  cores: 2
  hotplug: disk,network,cpu,memory
  hugepages: 2
  memory: 2048
  numa: 1
  numa1: memory=512,hostnodes=0,cpus=0-1,policy=bind
  numa2: memory=512,hostnodes=0,cpus=2-3,policy=bind

Both numa IDs 1 and 2 passed by foreach_dimm() have to be
mapped to host node 0.

Note that this also reverses the foreach_reverse_dimm() numa
node numbering as the current code, while walking sizes
backwards, walked the numa IDs inside each size forward,
which makes more sense. (Memory hot-unplug is still working
with this.)
2016-08-03 08:56:30 +02:00
Alexandre Derumier
ac7b70873a hugepages: use hostnodes value as numanode for topology
also disallow more than 1 hostnode value

Signed-off-by: Alexandre Derumier <aderumier@odiso.com>
2016-08-03 08:56:30 +02:00
Alexandre Derumier
a2a5ffc928 hugepages: check if numa node exist only if hugepages are enabled
Signed-off-by: Alexandre Derumier <aderumier@odiso.com>
2016-07-29 09:50:53 +02:00
Alexandre Derumier
7023f3ea16 add hugepages option
vm configuration
----------------
hugepages: (any|2|1024)

any: we'll try to allocate 1GB hugepage if possible, if not we use 2MB hugepage
2: we want to use 2MB hugepage
1024: we want to use 1GB hugepage. (memory need to be multiple of 1GB in this case)

optionnal host configuration for 1GB hugepages
----------------------------------------------
1GB hugepages can be allocated at boot if user want it.
hugepages need to be contiguous, so sometime it's not possible to reserve them on the fly

/etc/default/grub : GRUB_CMDLINE_LINUX_DEFAULT="quiet hugepagesz=1G hugepages=x"

Signed-off-by: Alexandre Derumier <aderumier@odiso.com>
Acked-by: Wolfgang Bumiller <w.bumiller@proxmox.com>
2016-06-22 09:11:11 +02:00
Alexandre Derumier
9a1c413f4b fix raise_param_exc in PVE::QemuServer::Memory::memory_unplug v2
Signed-off-by: Alexandre Derumier <aderumier@odiso.com>
2016-06-08 18:52:01 +02:00
Alexandre Derumier
37dbec899d fix check_running in PVE::QemuServer::Memory::qemu_memory_hotplug
Signed-off-by: Alexandre Derumier <aderumier@odiso.com>
2016-06-08 12:49:29 +02:00
Alexandre Derumier
0567a4d572 move memory config generation to QemuServer::Memory::config
Signed-off-by: Alexandre Derumier <aderumier@odiso.com>
2016-05-23 10:04:31 +02:00
Alexandre Derumier
6779f1ac3c move qemu_memory_hotplug && qemu_dimm_list to QemuServer::Memory
Signed-off-by: Alexandre Derumier <aderumier@odiso.com>
2016-05-23 10:03:40 +02:00
Alexandre Derumier
3f669af25d move foreach_dimm && foreach_reverse_dimm to QemuServer::Memory
Signed-off-by: Alexandre Derumier <aderumier@odiso.com>
2016-05-23 10:02:29 +02:00
Alexandre Derumier
a0649da28b add QemuServer::Memory
Signed-off-by: Alexandre Derumier <aderumier@odiso.com>
2016-05-23 10:02:07 +02:00