Skip to content

Commit c37849c

Browse files
committed
fix(tests/virtio-mem): increase base VM memory size to hotplug 16GB
The previously set 256MB were not enough for hotplugging 16GB of memory. This is because the kernel needs 64B for every 4kB page, meaning 262MB for 16GB. Signed-off-by: Riccardo Mancini <[email protected]>
1 parent 7048272 commit c37849c

File tree

1 file changed

+8
-3
lines changed

1 file changed

+8
-3
lines changed

tests/integration_tests/performance/test_hotplug_memory.py

Lines changed: 8 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -35,15 +35,20 @@ def uvm_booted_memhp(
3535

3636
uvm.spawn()
3737
uvm.memory_monitor = None
38+
uvm_config = {
39+
"boot_args": MEMHP_BOOTARGS,
40+
"huge_pages": huge_pages,
41+
# we need enough memory to be able to hotplug up to 16GB
42+
"mem_size_mib": 512,
43+
}
3844
if vhost_user:
3945
# We need to setup ssh keys manually because we did not specify rootfs
4046
# in microvm_factory.build method
4147
ssh_key = rootfs.with_suffix(".id_rsa")
4248
uvm.ssh_key = ssh_key
4349
uvm.basic_config(
44-
boot_args=MEMHP_BOOTARGS,
50+
**uvm_config,
4551
add_root_device=False,
46-
huge_pages=huge_pages,
4752
track_dirty_pages=(
4853
snapshot_type.needs_dirty_page_tracking if snapshot_type else False
4954
),
@@ -52,7 +57,7 @@ def uvm_booted_memhp(
5257
"rootfs", rootfs, is_root_device=True, is_read_only=True
5358
)
5459
else:
55-
uvm.basic_config(boot_args=MEMHP_BOOTARGS, huge_pages=huge_pages)
60+
uvm.basic_config(**uvm_config)
5661

5762
uvm.api.memory_hotplug.put(**memhp_config)
5863
uvm.add_net_iface()

0 commit comments

Comments
 (0)