Skip to content

Commit a2f3069

Browse files
committed
test(uffd): MAP_POPULATE backing file
We use example uffd handlers in performance tests to measure the population latency. We do not want for it to be diluted by the page faults in the backing file. Using an already populated backing file makes the measurement more precise. Signed-off-by: Nikita Kalyazin <[email protected]>
1 parent 1a410fb commit a2f3069

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/firecracker/examples/uffd/uffd_utils.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -225,7 +225,7 @@ impl Runtime {
225225
ptr::null_mut(),
226226
backing_memory_size,
227227
libc::PROT_READ,
228-
libc::MAP_PRIVATE,
228+
libc::MAP_PRIVATE | libc::MAP_POPULATE,
229229
backing_file.as_raw_fd(),
230230
0,
231231
)

0 commit comments

Comments
 (0)