Comment 5 for bug 1810977

Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix merged to nova (stable/rocky)

Reviewed: https://review.openstack.org/633197
Committed: https://git.openstack.org/cgit/openstack/nova/commit/?id=780ccfcbdea919b196c18372d1c66bc88b4fa48c
Submitter: Zuul
Branch: stable/rocky

commit 780ccfcbdea919b196c18372d1c66bc88b4fa48c
Author: Stephen Finucane <email address hidden>
Date: Tue Jan 8 17:01:41 2019 +0000

    Fix overcommit for NUMA-based instances

    Change I5f5c621f2f0fa1bc18ee9a97d17085107a5dee53 modified how we
    evaluated available memory for instances with a NUMA topology.
    Previously, we used a non-pagesize aware check unless the user had
    explicitly requested a specific pagesize. This means that for instances
    without pagesize requests, nova considers hugepages as available memory
    when deciding if a host has enough available memory for the instance.

    The aforementioned change modified this so that all NUMA-based
    instances, whether they had hugepages or not, would use the
    pagesize-aware check. Unfortunately the functionality it was reusing to
    do this was functionality previously only used for hugepages. Hugepages
    cannot be oversubscribed so we did not take oversubscription into
    account, comparing against available memory on the host (i.e. memory not
    consumed by other instances) rather than total memory. This is OK when
    using hugepages but not small pages, where overcommit is OK.

    Given that overcommit is already handled elsewhere in the code, we
    simply modify the non-hugepage code path to check for available memory
    of the lowest pagesize vs. total memory.

    Change-Id: I890b2c81cd49c1c601e9baee6a249709d0f6810e
    Signed-off-by: Stephen Finucane <email address hidden>
    Closes-Bug: #1810977
    (cherry picked from commit fd19aeafbce0fa11821b2a064bd694b078613c2f)