OpenCloudOS-Kernel/tools/testing/memblock/tests
Rebecca Mckeever 62bdc99008 memblock tests: add generic NUMA tests for memblock_alloc_exact_nid_raw
Add tests for memblock_alloc_exact_nid_raw() where the simulated physical
memory is set up with multiple NUMA nodes. Additionally, all but one of
these tests set nid != NUMA_NO_NODE. All tests are run for both top-down
and bottom-up allocation directions.

The tested scenarios are:

Range unrestricted:
- region cannot be allocated:
      + there are no previously reserved regions, but requested node is
        too small
      + the requested node is fully reserved
      + the requested node is partially reserved and does not have
        enough space
      + none of the nodes have enough memory to allocate the region

Range restricted:
- region can be allocated in the specific node requested without
  dropping min_addr:
      + the range fully overlaps with the node, and there are adjacent
        reserved regions
- region cannot be allocated:
      + range partially overlaps with two different nodes, where the
        second node is the requested node
      + range overlaps with multiple nodes along node boundaries, and
        the requested node starts after max_addr
      + nid is set to NUMA_NO_NODE and the total range can fit the
        region, but the range is split between two nodes and everything
        else is reserved

Acked-by: David Hildenbrand <david@redhat.com>
Signed-off-by: Rebecca Mckeever <remckee0@gmail.com>
Signed-off-by: Mike Rapoport <rppt@linux.ibm.com>
Link: https://lore.kernel.org/r/51b14da46e6591428df3aefc5acc7dca9341a541.1667802195.git.remckee0@gmail.com
2022-11-08 09:50:24 +02:00
..
alloc_api.c memblock_tests: move variable declarations to single block 2022-09-04 13:50:35 +03:00
alloc_api.h memblock tests: Add memblock_alloc tests for top down 2022-03-09 15:53:18 +02:00
alloc_exact_nid_api.c memblock tests: add generic NUMA tests for memblock_alloc_exact_nid_raw 2022-11-08 09:50:24 +02:00
alloc_exact_nid_api.h memblock tests: add top-down NUMA tests for memblock_alloc_exact_nid_raw 2022-11-08 09:50:24 +02:00
alloc_helpers_api.c memblock_tests: move variable declarations to single block 2022-09-04 13:50:35 +03:00
alloc_helpers_api.h memblock tests: Add memblock_alloc_from tests for top down 2022-03-09 15:54:03 +02:00
alloc_nid_api.c memblock tests: introduce range tests for memblock_alloc_exact_nid_raw 2022-11-08 09:50:24 +02:00
alloc_nid_api.h memblock tests: introduce range tests for memblock_alloc_exact_nid_raw 2022-11-08 09:50:24 +02:00
basic_api.c memblock test: Add test to memblock_reserve() 129th region 2022-10-31 10:15:00 +02:00
basic_api.h memblock tests: Add simulation of physical memory 2022-03-09 15:18:57 +02:00
common.c memblock test: Add test to memblock_add() 129th region 2022-10-31 10:15:00 +02:00
common.h memblock tests: introduce range tests for memblock_alloc_exact_nid_raw 2022-11-08 09:50:24 +02:00