@@ -44,12 +44,13 @@ def id(self):
44
44
"""Computes a unique id for this test instance"""
45
45
return "all_dev" if self .all_devices else f"{ self .vcpus } vcpu_{ self .mem } mb"
46
46
47
- def boot_vm (self , microvm_factory , guest_kernel , rootfs ) -> Microvm :
47
+ def boot_vm (self , microvm_factory , guest_kernel , rootfs , pci_enabled ) -> Microvm :
48
48
"""Creates the initial snapshot that will be loaded repeatedly to sample latencies"""
49
49
vm = microvm_factory .build (
50
50
guest_kernel ,
51
51
rootfs ,
52
52
monitor_memory = False ,
53
+ pci = pci_enabled ,
53
54
)
54
55
vm .spawn (log_level = "Info" , emit_metrics = True )
55
56
vm .time_api_requests = False
@@ -96,7 +97,7 @@ def boot_vm(self, microvm_factory, guest_kernel, rootfs) -> Microvm:
96
97
ids = lambda x : x .id ,
97
98
)
98
99
def test_restore_latency (
99
- microvm_factory , rootfs , guest_kernel_linux_5_10 , test_setup , metrics
100
+ microvm_factory , guest_kernel_linux_5_10 , rootfs , pci_enabled , test_setup , metrics
100
101
):
101
102
"""
102
103
Restores snapshots with vcpu/memory configuration, roughly scaling according to mem = (vcpus - 1) * 2048MB,
@@ -105,7 +106,9 @@ def test_restore_latency(
105
106
106
107
We only test a single guest kernel, as the guest kernel does not "participate" in snapshot restore.
107
108
"""
108
- vm = test_setup .boot_vm (microvm_factory , guest_kernel_linux_5_10 , rootfs )
109
+ vm = test_setup .boot_vm (
110
+ microvm_factory , guest_kernel_linux_5_10 , rootfs , pci_enabled
111
+ )
109
112
110
113
metrics .set_dimensions (
111
114
{
@@ -147,6 +150,7 @@ def test_post_restore_latency(
147
150
microvm_factory ,
148
151
rootfs ,
149
152
guest_kernel_linux_5_10 ,
153
+ pci_enabled ,
150
154
metrics ,
151
155
uffd_handler ,
152
156
huge_pages ,
@@ -156,7 +160,9 @@ def test_post_restore_latency(
156
160
pytest .skip ("huge page snapshots can only be restored using uffd" )
157
161
158
162
test_setup = SnapshotRestoreTest (mem = 1024 , vcpus = 2 , huge_pages = huge_pages )
159
- vm = test_setup .boot_vm (microvm_factory , guest_kernel_linux_5_10 , rootfs )
163
+ vm = test_setup .boot_vm (
164
+ microvm_factory , guest_kernel_linux_5_10 , rootfs , pci_enabled
165
+ )
160
166
161
167
metrics .set_dimensions (
162
168
{
@@ -204,14 +210,17 @@ def test_population_latency(
204
210
microvm_factory ,
205
211
rootfs ,
206
212
guest_kernel_linux_5_10 ,
213
+ pci_enabled ,
207
214
metrics ,
208
215
huge_pages ,
209
216
vcpus ,
210
217
mem ,
211
218
):
212
219
"""Collects population latency metrics (e.g. how long it takes UFFD handler to fault in all memory)"""
213
220
test_setup = SnapshotRestoreTest (mem = mem , vcpus = vcpus , huge_pages = huge_pages )
214
- vm = test_setup .boot_vm (microvm_factory , guest_kernel_linux_5_10 , rootfs )
221
+ vm = test_setup .boot_vm (
222
+ microvm_factory , guest_kernel_linux_5_10 , rootfs , pci_enabled
223
+ )
215
224
216
225
metrics .set_dimensions (
217
226
{
0 commit comments