Previous commit introduced a couple of problems in this area, for GEX44 hosts: - the amount of memory calculated for a VM/slice was based on number of cores and assumed 2:1 ratio of cpus to cores for stanard-gpu VM. It should be 1:1 ratio - the memory allocated was computed in the allocator but the memory freed was taken from VmSize structure, resulting in different values on GEX44 hosts. This commit fixes those problems. - It computes the amount of memory based on vcpus, just like VmSize - The update to the host is based on request.memory_gib value when not creating a slice - The update to the host is based on the amount allocated for a slice when using slices Added multiple tests to cover all those cases.
11 KiB
11 KiB