hardware: fix memory check usage for small/large pages
When huge pages are requested, we need to examine the host cell's
specific huge page amounts, not the amount of physical memory
associated with the host NUMA node.
Also when no pagesize is requested we should consider to compute
memory usage based on small pages since the amount of physical memory
available may also include some large pages.
The unit-tests has been updated to pass correct NUMACell mempages
information since the check is not done based on the pages available
on host. Also that the test 'test_host_usage_contiguous' to reflect to
correct update of pages availalbes on hist based on instance usage.
Reviewed: https:/ /review. openstack. org/532168 /git.openstack. org/cgit/ openstack/ nova/commit/ ?id=8241deee197 206d5458a61884c e08e1c2c2603d9
Committed: https:/
Submitter: Zuul
Branch: master
commit 8241deee197206d 5458a61884ce08e 1c2c2603d9
Author: Sahid Orentino Ferdjaoui <email address hidden>
Date: Tue Jan 9 06:46:03 2018 -0500
hardware: fix memory check usage for small/large pages
When huge pages are requested, we need to examine the host cell's
specific huge page amounts, not the amount of physical memory
associated with the host NUMA node.
Also when no pagesize is requested we should consider to compute
memory usage based on small pages since the amount of physical memory
available may also include some large pages.
The unit-tests has been updated to pass correct NUMACell mempages usage_contiguou s' to reflect to
information since the check is not done based on the pages available
on host. Also that the test 'test_host_
correct update of pages availalbes on hist based on instance usage.
Closes-bug: #1734204 bc18ee9a97d1708 5107a5dee53
Change-Id: I5f5c621f2f0fa1
Signed-off-by: Sahid Orentino Ferdjaoui <email address hidden>