Skip to content

Commit ba43e00

Browse files
authored
CP-309998: ignore small amount of pages in other nodes (#6884)
This is an optimisation for the calculation of the number of nodes until we fix all the small xen internal allocations for the VM outside the main guest's memory. This synchronises the behaviour in the RRD VM.numa_nodes calculation. rrdp-squeezed currently has a threshold of >4096 to count the number of nodes. This is to ignore small number of internal data structures that xen or other kernel devices may sometimes allocate for the VM outside the node where the VM's main memory is allocated. This is a temporary fix until we account in CP-311303 about these small number of pages that sometimes appear out of the VM's main node. In experiments, it's usually a single-digit number like 1. The maximum number observed was around ~2200 pages. Without this fix, the VM.numa_nodes calculation is different of the one returned by rrdp-squeezed, and VM.numa_nodes is over-sensitive to these small number of pages in other nodes.
2 parents 6a2e5ac + 464de44 commit ba43e00

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

ocaml/libs/xenctrl-ext/xenctrlext.ml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -165,7 +165,7 @@ module DomainNuma = struct
165165
let nodes =
166166
Array.fold_left
167167
(fun n pages ->
168-
if pages > 0L then
168+
if pages > 4096L then
169169
n + 1
170170
else
171171
n

0 commit comments

Comments
 (0)