@@ -18,11 +18,13 @@ def check_hugetlbfs_in_use(pid: int, allocation_name: str):
18
18
19
19
`allocation_name` should be the name of the smaps entry for which we want to verify that huge pages are used.
20
20
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.
22
24
"""
23
25
24
26
# 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
26
28
# Size: 262144 kB
27
29
# KernelPageSize: 2048 kB
28
30
# MMUPageSize: 2048 kB
@@ -70,7 +72,7 @@ def test_hugetlbfs_boot(uvm_plain):
70
72
71
73
check_hugetlbfs_in_use (
72
74
uvm_plain .firecracker_pid ,
73
- "memfd:guest_mem " ,
75
+ "/anon_hugepage " ,
74
76
)
75
77
76
78
@@ -97,7 +99,7 @@ def test_hugetlbfs_snapshot(
97
99
rc , _ , _ = vm .ssh .run ("true" )
98
100
assert not rc
99
101
100
- check_hugetlbfs_in_use (vm .firecracker_pid , "memfd:guest_mem " )
102
+ check_hugetlbfs_in_use (vm .firecracker_pid , "/anon_hugepage " )
101
103
102
104
snapshot = vm .snapshot_full ()
103
105
0 commit comments