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/599413 /git.openstack. org/cgit/ openstack/ nova/commit/ ?id=5e690180381 76a60abbb3c879a e7ac7f12b8341a
Committed: https:/
Submitter: Zuul
Branch: stable/rocky
commit 5e69018038176a6 0abbb3c879ae7ac 7f12b8341a
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 5458a61884ce08e 1c2c2603d9)
Change-Id: I5f5c621f2f0fa1
Signed-off-by: Sahid Orentino Ferdjaoui <email address hidden>
(cherry picked from commit 8241deee197206d