|
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [PATCH v8 0/8] xen/mm: introduce per-node NUMA memory claims
The page allocator supports domain-scoped claims that allow toolstacks
to reserve a quantity of available memory before populating the guest
physical memory of new domains they are building.
Claims let a domain builder fail early if there is not enough memory,
even when several domain builds run in parallel. A host-wide claim can
still succeed when too little memory is free on a required NUMA node.
Per-node claims let the builder reserve capacity where it is needed.
In the future, also claiming contiguous extents such as superpages
may be desirable, so a new, extensible claims API is needed.
Based on current needs, add domain-scoped, per-node claims to claim
memory capacity on selected nodes with domctls and libxc wrappers:
1. XEN_DOMCTL_set_memory_claims with xc_domain_set_memory_claims()
- A zero claim count releases the outstanding claims for the domain.
2. XEN_DOMCTL_get_memory_claims with xc_domain_get_memory_claims()
- Report the domain's outstanding claims by NUMA node and separately
report any host-wide claim.
Install claims before domain creation completes. The domain builder
should explicitly release any outstanding claims it no longer needs.
Automatic release when domain creation finishes is follow-up work.
The per-patch notes explain the design decisions and address likely
reviewer concerns:
https://xen.kaindl.dev/claims-docs-v8/designs/claims/code-review
The v7 submission:
https://lists.xen.org/archives/html/xen-devel/2026-05/msg00363.html
Summary of changes in v8:
- Split the submission into two groups of 4 patches each:
- Group 1: Protection, release, redemption and request installation.
1. xen/mm: protect per-node claims in get_free_buddy()
2. xen/mm: release per-node claims in domain_set_outstanding_pages()
3. xen/mm: redeem per-node claims for allocations
4. xen/mm: add domain_set_claims() for new claim requests
- Group 2: Handlers and xenctrl wrappers for the set and get paths.
5. xen/domctl: add XEN_DOMCTL_set_memory_claims
6. libxc: add xc_domain_set_memory_claims()
7. xen/domctl: add XEN_DOMCTL_get_memory_claims
8. libxc: add xc_domain_get_memory_claims()
- Split the domctl into separate set and get domctl paths.
- Convert d->claims[node] to be allocated dynamically when needed.
- Refactor claims installation into small, focused functions.
- Drop support for replacing existing claims; it is not required.
- Omit the change to reserve_offlined_page() in v8:
The least intrusive guard is to clamp unclaimed pages to be >= 0.
- Use 'per-node claims' instead of 'node-specific claims':
('node-specific claims' is outdated terminology from when
the series only supported a single NUMA node claim.)
- Rename the feature "per-node NUMA memory claims" to match.
- See the individual patches for their change histories.
---
Bernhard Kaindl (8):
xen/mm: protect per-node claims in get_free_buddy()
xen/mm: release per-node claims in domain_set_outstanding_pages()
xen/mm: redeem per-node claims for allocations
xen/mm: add domain_set_claims() for new claim requests
xen/domctl: add XEN_DOMCTL_set_memory_claims
libxc: add xc_domain_set_memory_claims()
xen/domctl: add XEN_DOMCTL_get_memory_claims
libxc: add xc_domain_get_memory_claims()
xen/include/public/domctl.h | 90 ++++++++++
xen/xsm/flask/policy/access_vectors | 5 +-
xen/xsm/flask/hooks.c | 6 +
xen/include/xen/mm.h | 17 ++
xen/include/xen/sched.h | 4 +
xen/common/domctl.c | 80 +++++++++
xen/common/page_alloc.c | 348 +++++++++++++++++++++++++++++++++++-
tools/include/xenctrl.h | 22 +++
tools/libs/ctrl/xc_domain.c | 51 ++++++
CHANGELOG.md | 5 +
10 files changed, 620 insertions(+), 8 deletions(-)
---
base-commit: 2d05921accad21e44de5b68dab0c1606e3ff4872
change-id: 20261130-claims-main-v8-16ef1ce188f6
Best regards,
--
Bernhard Kaindl <bernhard.kaindl@xxxxxxxxxx>
|
![]() |
Lists.xenproject.org is hosted with RackSpace, monitoring our |