bfc05a4c | 07-Nov-2022 |
Rebecca Mckeever <remckee0@gmail.com> |
memblock tests: add top-down 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. Addition
memblock tests: add top-down 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 of these tests set nid != NUMA_NO_NODE. These tests are run with a top-down allocation direction.
The tested scenarios are:
Range unrestricted: - region can be allocated in the specific node requested: + there are no previously reserved regions + the requested node is partially reserved but has enough space
Range restricted: - region can be allocated in the specific node requested after dropping min_addr: + range partially overlaps with two different nodes, where the first node is the requested node + range partially overlaps with two different nodes, where the requested node ends before min_addr + range overlaps with multiple nodes along node boundaries, and the requested node ends before min_addr
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/2cc0883243d68ddc3faf833d2d9e86f48534c1d7.1667802195.git.remckee0@gmail.com
show more ...
|
61da0332 | 07-Nov-2022 |
Rebecca Mckeever <remckee0@gmail.com> |
memblock tests: introduce range tests for memblock_alloc_exact_nid_raw
Add TEST_F_EXACT flag, which specifies that tests should run memblock_alloc_exact_nid_raw(). Introduce range tests for memblock
memblock tests: introduce range tests for memblock_alloc_exact_nid_raw
Add TEST_F_EXACT flag, which specifies that tests should run memblock_alloc_exact_nid_raw(). Introduce range tests for memblock_alloc_exact_nid_raw() by using the TEST_F_EXACT flag to run the range tests in alloc_nid_api.c, since memblock_alloc_exact_nid_raw() and memblock_alloc_try_nid_raw() behave the same way when nid = NUMA_NO_NODE.
Rename tests and other functions in alloc_nid_api.c by removing "_try". Since the test names will be displayed in verbose output, they need to be general enough to refer to any of the memblock functions that the tests may run.
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/5a4b6d1b6130ab7375314e1c45a6d5813dfdabbd.1667802195.git.remckee0@gmail.com
show more ...
|
62a56c54 | 11-Oct-2022 |
Shaoqin Huang <shaoqin.huang@intel.com> |
memblock test: Update TODO list
Remove the completed items from TODO list.
Signed-off-by: Shaoqin Huang <shaoqin.huang@intel.com> Signed-off-by: Mike Rapoport <rppt@linux.ibm.com> Link: https://lor
memblock test: Update TODO list
Remove the completed items from TODO list.
Signed-off-by: Shaoqin Huang <shaoqin.huang@intel.com> Signed-off-by: Mike Rapoport <rppt@linux.ibm.com> Link: https://lore.kernel.org/r/20221011062128.49359-4-shaoqin.huang@intel.com
show more ...
|
5b27dd79 | 11-Oct-2022 |
Shaoqin Huang <shaoqin.huang@intel.com> |
memblock test: Add test to memblock_reserve() 129th region
Reserve 129th region in the memblock, and this will trigger the memblock_double_array() function, this needs valid memory regions. So using
memblock test: Add test to memblock_reserve() 129th region
Reserve 129th region in the memblock, and this will trigger the memblock_double_array() function, this needs valid memory regions. So using dummy_physical_memory_init() to allocate a valid memory region. At the same time, reserve 128 faked memory region, and make sure these reserved region not intersect with the valid memory region. So memblock_double_array() will choose the valid memory region, and it will success.
Also need to restore the reserved.regions after memblock_double_array(), to make sure the subsequent tests can run as normal.
Signed-off-by: Shaoqin Huang <shaoqin.huang@intel.com> Signed-off-by: Mike Rapoport <rppt@linux.ibm.com> Link: https://lore.kernel.org/r/20221011062128.49359-3-shaoqin.huang@intel.com
show more ...
|
3e4519b7 | 13-Sep-2022 |
Rebecca Mckeever <remckee0@gmail.com> |
memblock tests: add generic NUMA tests for memblock_alloc_try_nid*
Add tests for memblock_alloc_try_nid() and memblock_alloc_try_nid_raw() where the simulated physical memory is set up with multiple
memblock tests: add generic NUMA tests for memblock_alloc_try_nid*
Add tests for memblock_alloc_try_nid() and memblock_alloc_try_nid_raw() where the simulated physical memory is set up with multiple NUMA nodes. Additionally, two 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: + 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: + 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/4b2c7e6e5f3a9837939e99293c77e0e6fc3ae4f9.1663046060.git.remckee0@gmail.com
show more ...
|
4b41046e | 13-Sep-2022 |
Rebecca Mckeever <remckee0@gmail.com> |
memblock tests: add bottom-up NUMA tests for memblock_alloc_try_nid*
Add tests for memblock_alloc_try_nid() and memblock_alloc_try_nid_raw() where the simulated physical memory is set up with multip
memblock tests: add bottom-up NUMA tests for memblock_alloc_try_nid*
Add tests for memblock_alloc_try_nid() and memblock_alloc_try_nid_raw() where the simulated physical memory is set up with multiple NUMA nodes. Additionally, all of these tests set nid != NUMA_NO_NODE. These tests are run with a bottom-up allocation direction.
The tested scenarios are:
Range unrestricted: - region can be allocated in the specific node requested: + there are no previously reserved regions + the requested node is partially reserved but has enough space - the specific node requested cannot accommodate the request, but the region can be allocated in a different node: + there are no previously reserved regions, but node is too small + the requested node is fully reserved + the requested node is partially reserved and does not have enough space
Range restricted: - region can be allocated in the specific node requested after dropping min_addr: + range partially overlaps with two different nodes, where the first node is the requested node + range partially overlaps with two different nodes, where the requested node ends before min_addr - region cannot be allocated in the specific node requested, but it can be allocated in the requested range: + range overlaps with multiple nodes along node boundaries, and the requested node ends before min_addr + range overlaps with multiple nodes along node boundaries, and the requested node starts after max_addr - region cannot be allocated in the specific node requested, but it can be allocated after dropping min_addr: + range partially overlaps with two different nodes, where the second node is the requested node
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/00c4810daaf5d050abc71915b24ed7419bb16b51.1663046060.git.remckee0@gmail.com
show more ...
|
50c80241 | 13-Sep-2022 |
Rebecca Mckeever <remckee0@gmail.com> |
memblock tests: add top-down NUMA tests for memblock_alloc_try_nid*
Add tests for memblock_alloc_try_nid() and memblock_alloc_try_nid_raw() where the simulated physical memory is set up with multipl
memblock tests: add top-down NUMA tests for memblock_alloc_try_nid*
Add tests for memblock_alloc_try_nid() and memblock_alloc_try_nid_raw() where the simulated physical memory is set up with multiple NUMA nodes. Additionally, all of these tests set nid != NUMA_NO_NODE. These tests are run with a top-down allocation direction.
The tested scenarios are:
Range unrestricted: - region can be allocated in the specific node requested: + there are no previously reserved regions + the requested node is partially reserved but has enough space - the specific node requested cannot accommodate the request, but the region can be allocated in a different node: + there are no previously reserved regions, but node is too small + the requested node is fully reserved + the requested node is partially reserved and does not have enough space
Range restricted: - region can be allocated in the specific node requested after dropping min_addr: + range partially overlaps with two different nodes, where the first node is the requested node + range partially overlaps with two different nodes, where the requested node ends before min_addr - region cannot be allocated in the specific node requested, but it can be allocated in the requested range: + range overlaps with multiple nodes along node boundaries, and the requested node ends before min_addr + range overlaps with multiple nodes along node boundaries, and the requested node starts after max_addr - region cannot be allocated in the specific node requested, but it can be allocated after dropping min_addr: + range partially overlaps with two different nodes, where the second node is the requested node
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/84009c5b3969337ccf89df850db56d364f8c228b.1663046060.git.remckee0@gmail.com
show more ...
|
b338bde5 | 13-Sep-2022 |
Rebecca Mckeever <remckee0@gmail.com> |
memblock tests: add simulation of physical memory with multiple NUMA nodes
Add function setup_numa_memblock() for setting up a memory layout with multiple NUMA nodes in a previously allocated dummy
memblock tests: add simulation of physical memory with multiple NUMA nodes
Add function setup_numa_memblock() for setting up a memory layout with multiple NUMA nodes in a previously allocated dummy physical memory. This function can be used in place of setup_memblock() in tests that need to simulate a NUMA system.
setup_numa_memblock(): - allows for setting up a memory layout by specifying the fraction of MEM_SIZE in each node
Set CONFIG_NODES_SHIFT to 4 when building with NUMA=1 to allow for up to 16 NUMA nodes.
Reviewed-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/4566d816a85f009268d4858d1ef06c7571a960f9.1663046060.git.remckee0@gmail.com
show more ...
|
42c3ba86 | 04-Sep-2022 |
Rebecca Mckeever <remckee0@gmail.com> |
memblock_tests: move variable declarations to single block
Move variable declarations to a single block at the beginning of each testing function.
Signed-off-by: Rebecca Mckeever <remckee0@gmail.co
memblock_tests: move variable declarations to single block
Move variable declarations to a single block at the beginning of each testing function.
Signed-off-by: Rebecca Mckeever <remckee0@gmail.com> Signed-off-by: Mike Rapoport <rppt@linux.ibm.com> Link: https://lore.kernel.org/r/e61431e73977f305fdd027bca99d1dc119e96d84.1662264355.git.remckee0@gmail.com
show more ...
|
35e49953 | 04-Sep-2022 |
Rebecca Mckeever <remckee0@gmail.com> |
memblock tests: remove 'cleared' from comment blocks
The tests in alloc_nid_api can now run either memblock_alloc_try_nid() or memblock_alloc_try_nid_raw(). The comment blocks for these tests should
memblock tests: remove 'cleared' from comment blocks
The tests in alloc_nid_api can now run either memblock_alloc_try_nid() or memblock_alloc_try_nid_raw(). The comment blocks for these tests should not refer to a 'cleared' region since that only applies to memblock_alloc_try_nid(). Remove 'cleared' from the comment blocks so that the comments are accurate for either memblock function.
Signed-off-by: Rebecca Mckeever <remckee0@gmail.com> Signed-off-by: Mike Rapoport <rppt@linux.ibm.com> Link: https://lore.kernel.org/r/e8be24137e54e9f81a06af969ded82b319114d7a.1662264347.git.remckee0@gmail.com
show more ...
|
dcd45ad2 | 27-Aug-2022 |
Rebecca Mckeever <remckee0@gmail.com> |
memblock tests: add tests for memblock_trim_memory
Add tests for memblock_trim_memory() for the following scenarios: - all regions aligned - one unaligned region that is smaller than the alignment -
memblock tests: add tests for memblock_trim_memory
Add tests for memblock_trim_memory() for the following scenarios: - all regions aligned - one unaligned region that is smaller than the alignment - one unaligned region that is unaligned at the base - one unaligned region that is unaligned at the end
Reviewed-by: Shaoqin Huang <shaoqin.huang@intel.com> Signed-off-by: Rebecca Mckeever <remckee0@gmail.com> Signed-off-by: Mike Rapoport <rppt@linux.ibm.com> Link: https://lore.kernel.org/r/0e5f55154a3b66581e04ba3717978795cbc08a5b.1661578349.git.remckee0@gmail.com
show more ...
|
a541c6d4 | 27-Aug-2022 |
Rebecca Mckeever <remckee0@gmail.com> |
memblock tests: add tests for memblock_*bottom_up functions
Add simple tests for memblock_set_bottom_up() and memblock_bottom_up().
Reviewed-by: David Hildenbrand <david@redhat.com> Reviewed-by: Sh
memblock tests: add tests for memblock_*bottom_up functions
Add simple tests for memblock_set_bottom_up() and memblock_bottom_up().
Reviewed-by: David Hildenbrand <david@redhat.com> Reviewed-by: Shaoqin Huang <shaoqin.huang@intel.com> Signed-off-by: Rebecca Mckeever <remckee0@gmail.com> Signed-off-by: Mike Rapoport <rppt@linux.ibm.com> Link: https://lore.kernel.org/r/b03701d2faeaf00f7184e4b72903de4e5e939437.1661578349.git.remckee0@gmail.com
show more ...
|
ae544fd6 | 27-Aug-2022 |
Rebecca Mckeever <remckee0@gmail.com> |
memblock tests: update alloc_nid_api to test memblock_alloc_try_nid_raw
Update memblock_alloc_try_nid() tests so that they test either memblock_alloc_try_nid() or memblock_alloc_try_nid_raw() depend
memblock tests: update alloc_nid_api to test memblock_alloc_try_nid_raw
Update memblock_alloc_try_nid() tests so that they test either memblock_alloc_try_nid() or memblock_alloc_try_nid_raw() depending on the value of alloc_nid_test_flags. Run through all the existing tests in alloc_nid_api twice: once for memblock_alloc_try_nid() and once for memblock_alloc_try_nid_raw().
When the tests run memblock_alloc_try_nid(), they test that the entire memory region is zero. When the tests run memblock_alloc_try_nid_raw(), they test that the entire memory region is nonzero. The content of the memory region is initialized to nonzero, and we expect it to remain unchanged if running memblock_alloc_try_nid_raw().
Reviewed-by: Shaoqin Huang <shaoqin.huang@intel.com> Signed-off-by: Rebecca Mckeever <remckee0@gmail.com> Signed-off-by: Mike Rapoport <rppt@linux.ibm.com> Link: https://lore.kernel.org/r/6fa8938f67872841c10a00afb042947d1d280a04.1661578349.git.remckee0@gmail.com
show more ...
|
deee033e | 27-Aug-2022 |
Rebecca Mckeever <remckee0@gmail.com> |
memblock tests: update alloc_api to test memblock_alloc_raw
Update memblock_alloc() tests so that they test either memblock_alloc() or memblock_alloc_raw() depending on the value of alloc_test_flags
memblock tests: update alloc_api to test memblock_alloc_raw
Update memblock_alloc() tests so that they test either memblock_alloc() or memblock_alloc_raw() depending on the value of alloc_test_flags. Run through all the existing tests in memblock_alloc_api twice: once for memblock_alloc() and once for memblock_alloc_raw().
When the tests run memblock_alloc(), they test that the entire memory region is zero. When the tests run memblock_alloc_raw(), they test that the entire memory region is nonzero. The content of the memory region is initialized to nonzero, and we expect it to remain unchanged if running memblock_alloc_raw().
Reviewed-by: Shaoqin Huang <shaoqin.huang@intel.com> Signed-off-by: Rebecca Mckeever <remckee0@gmail.com> Signed-off-by: Mike Rapoport <rppt@linux.ibm.com> Link: https://lore.kernel.org/r/5a7cfb2f807ee2cb53ee77f9f5c910107b253d6e.1661578349.git.remckee0@gmail.com
show more ...
|
21a233f6 | 27-Aug-2022 |
Rebecca Mckeever <remckee0@gmail.com> |
memblock tests: add additional tests for basic api and memblock_alloc
Add tests for memblock_add(), memblock_reserve(), memblock_remove(), memblock_free(), and memblock_alloc() for the following tes
memblock tests: add additional tests for basic api and memblock_alloc
Add tests for memblock_add(), memblock_reserve(), memblock_remove(), memblock_free(), and memblock_alloc() for the following test scenarios.
memblock_add() and memblock_reserve(): - add/reserve a memory block in the gap between two existing memory blocks, and check that the blocks are merged into one region - try to add/reserve memblock regions that extend past PHYS_ADDR_MAX
memblock_remove() and memblock_free(): - remove/free a region when it is the only available region + These tests ensure that the first region is overwritten with a "dummy" region when the last remaining region of that type is removed or freed. - remove/free() a region that overlaps with two existing regions of the relevant type - try to remove/free memblock regions that extend past PHYS_ADDR_MAX
memblock_alloc(): - try to allocate a region that is larger than the total size of available memory (memblock.memory)
Reviewed-by: David Hildenbrand <david@redhat.com> Reviewed-by: Shaoqin Huang <shaoqin.huang@intel.com> Signed-off-by: Rebecca Mckeever <remckee0@gmail.com> Signed-off-by: Mike Rapoport <rppt@linux.ibm.com> Link: https://lore.kernel.org/r/c23c0393c5b9a53fe7f676996913c629495e9727.1661578349.git.remckee0@gmail.com
show more ...
|
fb2e97fe | 27-Aug-2022 |
Rebecca Mckeever <remckee0@gmail.com> |
memblock tests: add labels to verbose output for generic alloc tests
Generic tests for memblock_alloc*() functions do not use separate functions for testing top-down and bottom-up allocation directi
memblock tests: add labels to verbose output for generic alloc tests
Generic tests for memblock_alloc*() functions do not use separate functions for testing top-down and bottom-up allocation directions. Therefore, the function name that is displayed in the verbose testing output does not include the allocation direction.
Add an additional prefix when running generic tests for memblock_alloc*() functions that indicates which allocation direction is set. The prefix will be displayed when the tests are run in verbose mode.
Reviewed-by: David Hildenbrand <david@redhat.com> Reviewed-by: Shaoqin Huang <shaoqin.huang@intel.com> Signed-off-by: Rebecca Mckeever <remckee0@gmail.com> Signed-off-by: Mike Rapoport <rppt@linux.ibm.com> Link: https://lore.kernel.org/r/fb76a42253d2a196a7daea29dd8121a69904f58e.1661578349.git.remckee0@gmail.com
show more ...
|
25b9defb | 27-Aug-2022 |
Rebecca Mckeever <remckee0@gmail.com> |
memblock tests: update zeroed memory check for memblock_alloc_* tests
Update the assert in memblock_alloc_try_nid() and memblock_alloc_from() tests that checks whether the memory is cleared so that
memblock tests: update zeroed memory check for memblock_alloc_* tests
Update the assert in memblock_alloc_try_nid() and memblock_alloc_from() tests that checks whether the memory is cleared so that it checks the entire chunk of allocated memory instead of just the first byte.
Reviewed-by: David Hildenbrand <david@redhat.com> Reviewed-by: Shaoqin Huang <shaoqin.huang@intel.com> Signed-off-by: Rebecca Mckeever <remckee0@gmail.com> Signed-off-by: Mike Rapoport <rppt@linux.ibm.com> Link: https://lore.kernel.org/r/24b3271751756100142e65b75284d43b4d30c9b7.1661578349.git.remckee0@gmail.com
show more ...
|
ac76d803 | 27-Aug-2022 |
Rebecca Mckeever <remckee0@gmail.com> |
memblock tests: update tests to check if memblock_alloc zeroed memory
Add an assert in memblock_alloc() tests where allocation is expected to occur. The assert checks whether the entire chunk of all
memblock tests: update tests to check if memblock_alloc zeroed memory
Add an assert in memblock_alloc() tests where allocation is expected to occur. The assert checks whether the entire chunk of allocated memory is cleared.
The current memblock_alloc() tests do not check whether the allocated memory was zeroed. memblock_alloc() should zero the allocated memory since it is a wrapper for memblock_alloc_try_nid().
Reviewed-by: Shaoqin Huang <shaoqin.huang@intel.com> Reviewed-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/83ffb941b65074f40eb14552f8bfe5b71fe50abd.1661578349.git.remckee0@gmail.com
show more ...
|
61ebea2b | 14-Aug-2022 |
Rebecca Mckeever <remckee0@gmail.com> |
memblock tests: update reference to obsolete build option in comments
The VERBOSE build option was replaced with the --verbose runtime option, but the comments describing the ASSERT_*() macros still
memblock tests: update reference to obsolete build option in comments
The VERBOSE build option was replaced with the --verbose runtime option, but the comments describing the ASSERT_*() macros still refer to the VERBOSE build option. Update these comments so that they refer to the --verbose runtime option.
Reviewed-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/5f8a4c2bde34cc029282c68d47eda982d950f421.1660451025.git.remckee0@gmail.com
show more ...
|
04d94909 | 29-Jul-2022 |
Shaoqin Huang <shaoqin.huang@intel.com> |
memblock test: Modify the obsolete description in README
The VERBOSE option in Makefile has been moved, but there still have the description left in README. For now, we use `-v` options when running
memblock test: Modify the obsolete description in README
The VERBOSE option in Makefile has been moved, but there still have the description left in README. For now, we use `-v` options when running memblock test to print information, so using the new to replace the obsolete items.
Signed-off-by: Shaoqin Huang <shaoqin.huang@intel.com> Acked-by: Rebecca Mckeever <remckee0@gmail.com> Signed-off-by: Mike Rapoport <rppt@linux.ibm.com> Link: https://lore.kernel.org/r/20220729161125.190845-1-shaoqin.huang@intel.com
show more ...
|