|
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [PATCH 0/4] xen/mm: Host-side unit/integration test framework for page_alloc.c
Hi all, This patch series adds a host-side unit and integration test framework for the Xen page allocator in xen/common/page_alloc.c. Using this framework, it also adds a host-side integration test suite for memory claims, including NUMA-aware claim sets. This test suite complements the functional system tests submitted as part of the NUMA-aware claims v6 series yesterday. The purpose is to verify the behaviour of the page allocator when multi-node claim sets are present in situations that are easier to create and validate in isolation, with full control over a synthetic Xen heap state and visibility into the claim state of domains as claims are made and redeemed through heap allocation. This series depends on the NUMA claims v6 series, which introduced NUMA-aware claim sets which I submitted yesterday: [PATCH v6 0/7] xen/mm: Introduce NUMA-aware claim sets for domains https://lists.xen.org/archives/html/xen-devel/2026-04/msg00587.html https://patchwork.kernel.org/project/xen-devel/list/?series=1081139 Its design is described in this design document submitted yesterday: [PATCH v2] docs: Draft Design Document for NUMA-aware claim sets https://lists.xen.org/archives/html/xen-devel/2026-04/msg00569.html https://patchwork.kernel.org/project/xen-devel/list/?series=1081047 Patch summary: 1. tools/tests/alloc: Add test framework for xen/common/page_alloc.c 2. tools/tests/alloc: Add integration tests for claims and claim sets 3. tools/tests/alloc: Add tests for offlining with claims present 4. xen/mm: Fix recalling claims when offlining pages if needed Thanks, Bernhard Kaindl --- PS: The bug fixed in the last commit of this series affects global outstanding claims as implemented in current Xen master as well. However, this only arises when Xen offlines pages. Page offlining code in current Xen still has known limitations, particularly when offlining pages from larger buddies, and should be avoided in the interest of heap integrity. That said, this test framework makes it possible to run targeted test cases on a synthetic Xen heap and observe logged changes to the heap during page offlining. That should make further offlining fixes easier to validate, both by checking the test results and by inspecting the resulting heap state. If you are interested in that, the next series will add a test suite for offlining pages using this test framework. That should make it possible to observe the effects of the bugs and the corresponding fixes on any machine able to compile Xen source code. Bernhard Kaindl (4): tools/tests/alloc: Unit and Integration Test Framework for page_alloc.c tools/tests/alloc: Add integration test suite for memory claims tools/tests/alloc: Add tests for offlining with claims present xen/mm: Recall claims when offlining pages if needed tools/tests/Makefile | 1 + tools/tests/alloc/.gitignore | 6 + tools/tests/alloc/Makefile | 141 ++++++ tools/tests/alloc/README.rst | 31 ++ tools/tests/alloc/check-asserts.h | 347 +++++++++++++++ tools/tests/alloc/harness.h | 69 +++ tools/tests/alloc/hypervisor-macros.h | 101 +++++ tools/tests/alloc/libtest-page_alloc.h | 356 +++++++++++++++ tools/tests/alloc/mock-page_list.h | 307 +++++++++++++ tools/tests/alloc/page_alloc-wrapper.h | 465 ++++++++++++++++++++ tools/tests/alloc/page_alloc_shim.h | 433 ++++++++++++++++++ tools/tests/alloc/test-claims_basic.c | 230 ++++++++++ tools/tests/alloc/test-claims_numa_redeem.c | 201 +++++++++ tools/tests/alloc/test-offlining-claims.c | 102 +++++ xen/common/page_alloc.c | 42 ++ 15 files changed, 2832 insertions(+) create mode 100644 tools/tests/alloc/.gitignore create mode 100644 tools/tests/alloc/Makefile create mode 100644 tools/tests/alloc/README.rst create mode 100644 tools/tests/alloc/check-asserts.h create mode 100644 tools/tests/alloc/harness.h create mode 100644 tools/tests/alloc/hypervisor-macros.h create mode 100644 tools/tests/alloc/libtest-page_alloc.h create mode 100644 tools/tests/alloc/mock-page_list.h create mode 100644 tools/tests/alloc/page_alloc-wrapper.h create mode 100644 tools/tests/alloc/page_alloc_shim.h create mode 100644 tools/tests/alloc/test-claims_basic.c create mode 100644 tools/tests/alloc/test-claims_numa_redeem.c create mode 100644 tools/tests/alloc/test-offlining-claims.c -- 2.39.5
|
![]() |
Lists.xenproject.org is hosted with RackSpace, monitoring our |