Skip to content

Commit eb219d7

Browse files
committed
test(hugepages): adjust for anon private memory
Huge pages tests search for memory mapping name, which is now anon private instead of memfd. Signed-off-by: Nikita Kalyazin <[email protected]>
1 parent d6a775d commit eb219d7

File tree

1 file changed

+6
-4
lines changed

1 file changed

+6
-4
lines changed

tests/integration_tests/performance/test_huge_pages.py

Lines changed: 6 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -18,11 +18,13 @@ def check_hugetlbfs_in_use(pid: int, allocation_name: str):
1818
1919
`allocation_name` should be the name of the smaps entry for which we want to verify that huge pages are used.
2020
For memfd-backed guest memory, this would be "memfd:guest_mem" (the `guest_mem` part originating from the name
21-
we give the memfd in memory.rs), for anonymous memory this would be "/anon_hugepage"
21+
we give the memfd in memory.rs), for anonymous memory this would be "/anon_hugepage".
22+
Note: in our testing, we do not currently configure vhost-user-blk devices, so we only exercise
23+
the "/anon_hugepage" case.
2224
"""
2325

2426
# Format of a sample smaps entry:
25-
# 7fc2bc400000-7fc2cc400000 rw-s 00000000 00:10 25488401 /memfd:guest_mem (deleted)
27+
# 7fc2bc400000-7fc2cc400000 rw-s 00000000 00:10 25488401 /anon_hugepage
2628
# Size: 262144 kB
2729
# KernelPageSize: 2048 kB
2830
# MMUPageSize: 2048 kB
@@ -70,7 +72,7 @@ def test_hugetlbfs_boot(uvm_plain):
7072

7173
check_hugetlbfs_in_use(
7274
uvm_plain.firecracker_pid,
73-
"memfd:guest_mem",
75+
"/anon_hugepage",
7476
)
7577

7678

@@ -97,7 +99,7 @@ def test_hugetlbfs_snapshot(
9799
rc, _, _ = vm.ssh.run("true")
98100
assert not rc
99101

100-
check_hugetlbfs_in_use(vm.firecracker_pid, "memfd:guest_mem")
102+
check_hugetlbfs_in_use(vm.firecracker_pid, "/anon_hugepage")
101103

102104
snapshot = vm.snapshot_full()
103105

0 commit comments

Comments
 (0)