Skip to content

Commit ad41d56

Browse files
committed
CA-422187: safer defaults for global claims
Xen may have already allocated some memory for the domain, and the overhead is only an estimate. A global claim failing is a hard failure, so instead use a more conservative estimate: `memory.build_start_mib`. This is similar to `required_host_free_mib`, but doesn't take overhead into account. Eventually we'd want to have another argument to the create hypercall that tells it what NUMA node(s) to use, and then we can include all the overhead too there. Fixes: 060d792 ("CA-422188: either always use claims or never use claims") Signed-off-by: Edwin Török <[email protected]>
1 parent 112db1f commit ad41d56

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

ocaml/xenopsd/xc/domain.ml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1114,7 +1114,7 @@ let build_pre ~xc ~xs ~vcpus ~memory ~hard_affinity domid =
11141114
Xenops_server.cores_of_numa_affinity_policy pin ~vcpus
11151115
in
11161116
let memory =
1117-
Int64.(mul memory.required_host_free_mib (shift_left 1L 20))
1117+
Int64.(mul memory.build_start_mib (shift_left 1L 20))
11181118
in
11191119
match numa_placement domid ~vcpus ~cores ~memory affinity with
11201120
| None ->

0 commit comments

Comments
 (0)