Skip to content

Add support for exact-node memory claims

Alejandro Vallejo xen-devel 1 version In review

Get series with b4
b4 am [email protected]

Versions newest first

  1. v1 Latest11 patches 20 repliesIn review

Patches in v1 No applies recorded yet

#Subject and filesSizeRepliesApplied
1/11xen/memory: Mask XENMEMF_node() to 8 bitsxen/include/public/memory.h+3 -22 replies
2/11xen/page_alloc: Remove `claim` from domain_set_outstanding_pages()xen/common/page_alloc.c+6 -135 replies
3/11xen/page_alloc: Add static per-node counts of free pagesxen/common/page_alloc.c+7 -02 replies
4/11xen: Add node argument to domain_{adjust_tot_pages,set_outstanding_pages}()xen/arch/x86/mm.c xen/arch/x86/mm/mem_sharing.c xen/common/domain.c +4 more+27 -152 replies
5/11xen: Create per-node outstanding claimsxen/common/page_alloc.c xen/include/xen/sched.h+34 -12 replies
6/11xen/page_alloc: Hook per-node claims to alloc_heap_pages()xen/common/page_alloc.c+41 -31 reply
7/11xen/page_alloc: Set node affinity when claiming pages from an exact nodexen/common/page_alloc.c+7 -12 replies
8/11xen/memory: Enable parsing NUMA node argument in XENMEM_claim_pagesxen/common/memory.c+20 -31 reply
9/11tools/xc: Add `node` argument to xc_domain_claim_pages()tools/include/xenctrl.h tools/libs/ctrl/xc_domain.c tools/libs/guest/xg_dom_x86.c+18 -41 reply
10/11tools/xl: Expose a "claim_on_node" setting in xl.cfgtools/golang/xenlight/helpers.gen.go tools/golang/xenlight/types.gen.go tools/include/xenguest.h +5 more+35 -101 reply
11/11docs/man: Document the new claim_on_node optiondocs/man/xl-numa-placement.7.pod docs/man/xl.1.pod.in docs/man/xl.cfg.5.pod.in+23 -11 reply

Reviews trailers per patch

No Reviewed-by, Acked-by or Tested-by trailers for v1 yet.

Read the v1 thread

Cover letter [PATCH 00/11] Add support for exact-node memory claims

The Xen toolstack supports claiming memory ahead of allocating it with the intent of assisting bootstorms of massive VMs. This works ok for general VMs, but falls appart miserably whenever the toolstack attempts to force placement of specific NUMA nodes.

This series extends the in-hypervisor claim infrastructure to support per-node claims, and propagates the knob all the way to xl.cfg.

A worthy future goal is the support of multi-node claims per domain, but the objective of this series is far more modest and merely intends to enable claiming memory on a single node for specific domains. This solves a real-world use case of bundling many small VMs in a single NUMA machine.

The feature specifically allows combining domains with exact-node claims, general claims and no claims at all in a consistent fashion.

Alejandro Vallejo (11):
xen/memory: Mask XENMEMF_node() to 8 bits xen/page_alloc: Remove claim from domain_set_outstanding_pages() xen/page_alloc: Add static per-node counts of free pages
xen: Add node argument to
domain_{adjust_tot_pages,set_outstanding_pages}()
xen: Create per-node outstanding claims
xen/page_alloc: Hook per-node claims to alloc_heap_pages() xen/page_alloc: Set node affinity when claiming pages from an exact
node
xen/memory: Enable parsing NUMA node argument in XENMEM_claim_pages tools/xc: Add node argument to xc_domain_claim_pages() tools/xl: Expose a "claim_on_node" setting in xl.cfg docs/man: Document the new claim_on_node option

 docs/man/xl-numa-placement.7.pod     |   8 ++
 docs/man/xl.1.pod.in                 |   2 +-
 docs/man/xl.cfg.5.pod.in             |  14 +++
 tools/golang/xenlight/helpers.gen.go |   2 +
 tools/golang/xenlight/types.gen.go   |   1 +
 tools/include/xenctrl.h              |   1 +
 tools/include/xenguest.h             |   7 ++
 tools/libs/ctrl/xc_domain.c          |  13 ++-
 tools/libs/guest/xg_dom_core.c       |   1 +
 tools/libs/guest/xg_dom_x86.c        |  22 ++---
 tools/libs/light/libxl_dom.c         |   2 +
 tools/libs/light/libxl_types.idl     |   3 +-
 tools/xl/xl_parse.c                  |  11 +++
 xen/arch/x86/mm.c                    |   3 +-
 xen/arch/x86/mm/mem_sharing.c        |   4 +-
 xen/common/domain.c                  |   2 +-
 xen/common/grant_table.c             |   4 +-
 xen/common/memory.c                  |  25 +++++-
 xen/common/page_alloc.c              | 125 ++++++++++++++++++++++-----
 xen/include/public/memory.h          |   5 +-
 xen/include/xen/mm.h                 |   6 +-
 xen/include/xen/sched.h              |   3 +
 22 files changed, 216 insertions(+), 48 deletions(-)
Signature · 1 line
2.48.1