vm: move comment about memory overhead constants near their definition

This commit is contained in:
Marek Marczykowski-Górecki 2019-02-25 03:24:45 +01:00
parent 9257a6d14f
commit 723b33a2f6
No known key found for this signature in database
GPG Key ID: 063938BA42CFA724

View File

@ -52,6 +52,10 @@ try:
except ImportError:
pass
# overhead of per-qube/per-vcpu Xen structures,
# taken from OpenStack nova/virt/xenapi/driver.py
# see https://wiki.openstack.org/wiki/XenServer/Overhead
# add an extra MB because Nova rounds up to MBs
MEM_OVERHEAD_BASE = (3 + 1) * 1024 * 1024
MEM_OVERHEAD_PER_VCPU = 3 * 1024 * 1024 / 2
@ -1422,11 +1426,6 @@ class QubesVM(qubes.vm.mix.net.NetVMMixin, qubes.vm.BaseVM):
return True
def request_memory(self, mem_required=None):
# overhead of per-qube/per-vcpu Xen structures,
# taken from OpenStack nova/virt/xenapi/driver.py
# see https://wiki.openstack.org/wiki/XenServer/Overhead
# add an extra MB because Nova rounds up to MBs
if not qmemman_present:
return None