From: Bernhard Kaindl <bernhard.kaindl@citrix.com>
To: xen-devel@lists.xenproject.org
Cc: "Bernhard Kaindl" <bernhard.kaindl@citrix.com>,
"Anthony PERARD" <anthony.perard@vates.tech>,
"Andrew Cooper" <andrew.cooper3@citrix.com>,
"Michal Orzel" <michal.orzel@amd.com>,
"Jan Beulich" <jbeulich@suse.com>,
"Julien Grall" <julien@xen.org>,
"Roger Pau Monné" <roger.pau@citrix.com>,
"Stefano Stabellini" <sstabellini@kernel.org>
Subject: [PATCH v2 0/4] xen/mm: Host-side integration test environment for page_alloc.c
Date: Mon, 20 Apr 2026 14:19:40 +0100 [thread overview]
Message-ID: <cover.1776690702.git.bernhard.kaindl@citrix.com> (raw)
Hi all,
This patch series introduces a host-side integration test environment
for Xen's page allocator in xen/common/page_alloc.c, reduced in size
by 60% from 2257 to 1411 new lines with v2.
Using this environment, it also introduces integration tests for claims,
including NUMA-aware claim sets, complementing the functional system tests
submitted as part of the NUMA-aware claims v6 series.
The claim tests verify the page allocator's behaviour with multi-node
claim sets in scenarios that are easier to isolate and validate using a
synthetic Xen heap and domain state, offering full control and visibility
into claim states as claims are made and redeemed during heap allocation.
For these tests, this series depends on the NUMA claims v6 series,
which introduced NUMA-aware claim sets:
[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 document:
[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 a test environment for the page allocator
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: Recall claims when offlining pages if needed
Thanks,
Bernhard Kaindl
---
Changes since v1:
1. Refactored the test environment for minimalism:
- Improved separation of concerns.
- Moved extensions to later patch series.
- Simplified code with targeted assertions and concise comments.
2. Fixed file names to avoid underscores.
3. Updated include guards to comply with CODING_STYLE.
---
PS: The bug fixed in the last commit also affects the global claims
in Xen master when offlining pages.
While offlining has known limitations, the bug fixed in this series also
affects global claims in Xen master when pages are offlined. I will submit
a follow-up series to address offlining itself. In the meantime, this test
framework enables targeted testing on a synthetic Xen heap and simplifies
validation by letting the tests observe heap-state changes during offlining.
Bernhard Kaindl (4):
tools/tests/alloc: Add Page Allocator Test Environment
tools/tests/alloc: Add integration test suite to for NUMA 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 | 7 +
tools/tests/alloc/Makefile | 141 +++++++
tools/tests/alloc/README.rst | 98 +++++
tools/tests/alloc/check-asserts.h | 225 +++++++++++
tools/tests/alloc/harness.h | 57 +++
tools/tests/alloc/hypervisor-macros.h | 95 +++++
tools/tests/alloc/libtest-page-alloc.h | 145 +++++++
tools/tests/alloc/mock-page-list.h | 167 ++++++++
tools/tests/alloc/page-alloc-shim.h | 411 ++++++++++++++++++++
tools/tests/alloc/page-alloc-wrapper.h | 64 +++
tools/tests/alloc/test-claims-basic.c | 108 +++++
tools/tests/alloc/test-claims-numa-redeem.c | 172 ++++++++
tools/tests/alloc/test-offlining-claims.c | 71 ++++
xen/common/page_alloc.c | 42 ++
15 files changed, 1804 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-shim.h
create mode 100644 tools/tests/alloc/page-alloc-wrapper.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
next reply other threads:[~2026-04-20 13:23 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-04-20 13:19 Bernhard Kaindl [this message]
2026-04-20 13:19 ` [PATCH v2 1/4] tools/tests/alloc: Add Page Allocator Test Environment Bernhard Kaindl
2026-04-20 13:19 ` [PATCH v2 2/4] tools/tests/alloc: Add integration test suite to for NUMA memory claims Bernhard Kaindl
2026-04-20 13:19 ` [PATCH v2 3/4] tools/tests/alloc: Add tests for offlining with claims present Bernhard Kaindl
2026-04-20 13:19 ` [PATCH v2 4/4] xen/mm: Recall claims when offlining pages if needed Bernhard Kaindl
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=cover.1776690702.git.bernhard.kaindl@citrix.com \
--to=bernhard.kaindl@citrix.com \
--cc=andrew.cooper3@citrix.com \
--cc=anthony.perard@vates.tech \
--cc=jbeulich@suse.com \
--cc=julien@xen.org \
--cc=michal.orzel@amd.com \
--cc=roger.pau@citrix.com \
--cc=sstabellini@kernel.org \
--cc=xen-devel@lists.xenproject.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.