Skip to content

Commit b5fb497

Browse files
authored
(docs) Mention that wait_xen_free_mem terminates on physinfo.scrub_pages = 0 (#6313)
Minor improvement - more detail about `wait_xen_free_mem` (called for waiting for scrubbing): Mention that it terminates in case free memory is smaller than required memory and `physinfo.scrub_pages = 0` (will never have enough memory for this VM).
2 parents 45b0b21 + 41d458e commit b5fb497

File tree

1 file changed

+14
-1
lines changed

1 file changed

+14
-1
lines changed

doc/content/xenopsd/walkthroughs/VM.build/Domain.build.md

Lines changed: 14 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -62,7 +62,20 @@ to call:
6262

6363
1. [Call](https://github.com/xapi-project/xen-api/blob/master/ocaml/xenopsd/xc/domain.ml#L902-L911)
6464
[wait_xen_free_mem](https://github.com/xapi-project/xen-api/blob/master/ocaml/xenopsd/xc/domain.ml#L236-L272)
65-
to wait (if necessary), for the Xen memory scrubber to catch up reclaiming memory (CA-39743)
65+
to wait (if necessary), for the Xen memory scrubber to catch up reclaiming memory.
66+
It
67+
1. calls `Xenctrl.physinfo` which returns:
68+
- `hostinfo.free_pages` - the free and already scrubbed pages (available)
69+
- `host.scrub_pages` - the not yet scrubbed pages (not yet available)
70+
2. repeats this until a timeout as long as `free_pages` is *lower*
71+
than the *required* pages
72+
- unless if `scrub_pages` is 0 (no scrubbing left to do)
73+
74+
Note: `free_pages` is system-wide memory, not memory specific to a NUMA node.
75+
Because this is not NUMA-aware, in case of temporary node-specific memory shortage,
76+
this check is not sufficient to prevent the VM from being spread over all NUMA nodes.
77+
It is planned to resolve this issue by claiming NUMA node memory during NUMA placement.
78+
6679
2. Call the hypercall to set the timer mode
6780
3. Call the hypercall to set the number of vCPUs
6881
4. Call the `numa_placement` function

0 commit comments

Comments
 (0)