Skip to content

Commit 67f2e32

Browse files
authored
Revert CA-423816 - memory double counting (#7050)
Revert this for now because it triggers a bug at lower levels: CA-426859
2 parents 3d1418c + 8cbb690 commit 67f2e32

2 files changed

Lines changed: 4 additions & 7 deletions

File tree

ocaml/quicktest/quicktest_vm_memory.ml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@ let check_tasks tasks =
1212
let one t ~host ~vm ~workload_vm n =
1313
Trace.with_ __FUNCTION__ @@ fun scope ->
1414
workload t ~host ~workload_vm ;
15-
let vms = fill_mem_n t ~workaround_migration:false ~host ~vm ~n in
15+
let vms = fill_mem_n t ~workaround_migration:true ~host ~vm ~n in
1616

1717
let migration_host, migration_vm = List.nth vms 0 in
1818

ocaml/xenopsd/xc/xenops_server_xen.ml

Lines changed: 3 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1852,16 +1852,13 @@ module VM = struct
18521852
"VM = %s; using memory_dynamic_min = %Ld and \
18531853
memory_dynamic_max = %Ld"
18541854
vm.Vm.id vm.memory_dynamic_min vm.memory_dynamic_max ;
1855-
( vm.memory_dynamic_min +++ overhead_bytes
1856-
, vm.memory_dynamic_max +++ overhead_bytes
1857-
, None
1858-
)
1855+
(vm.memory_dynamic_min, vm.memory_dynamic_max, None)
18591856
)
18601857
in
1861-
let min_kib = kib_of_bytes_used min_bytes
1858+
let min_kib = kib_of_bytes_used (min_bytes +++ overhead_bytes)
18621859
and memory_total_source_kib =
18631860
Option.map kib_of_bytes_used memory_total_source_bytes
1864-
and max_kib = kib_of_bytes_used max_bytes in
1861+
and max_kib = kib_of_bytes_used (max_bytes +++ overhead_bytes) in
18651862
(* XXX: we would like to be able to cancel an in-progress
18661863
with_reservation *)
18671864
let dbg = Xenops_task.get_dbg task in

0 commit comments

Comments
 (0)