Skip to content

Commit 5f64b89

Browse files
committed
doc: Explain how the UFFD handler gets information about pagesize
Document the new part of the initial handshake where Firecracker tells the UFFD handler about page size in KiB. Signed-off-by: Patrick Roy <[email protected]>
1 parent 06b9ab9 commit 5f64b89

File tree

3 files changed

+12
-2
lines changed

3 files changed

+12
-2
lines changed

CHANGELOG.md

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -31,6 +31,10 @@ and this project adheres to
3131
supported snapshot version format. This change renders all previous
3232
Firecracker snapshots (up to Firecracker version v1.6.0) incompatible with the
3333
current Firecracker version.
34+
- [#4449](https://github.com/firecracker-microvm/firecracker/pull/4449): Added
35+
information about page size to the payload Firecracker sends to the UFFD
36+
handler. Each memory region object now contains a `page_size_kib` field. See
37+
also the [hugepages documentation](docs/hugepages.md).
3438

3539
### Fixed
3640

docs/hugepages.md

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -33,6 +33,11 @@ microVMs backed with huge pages can only be restored via UFFD. Lastly, note that
3333
even for guests backed by huge pages, differential snapshots will always track
3434
write accesses to guest memory at 4K granularity.
3535

36+
When restoring snapshots via UFFD, Firecracker will send the configured page
37+
size (in KiB) for each memory region as part of the initial handshake, as
38+
described in our documentation on
39+
[UFFD-assisted snapshot-restore](snapshotting/handling-page-faults-on-snapshot-resume.md).
40+
3641
## Known Limitations
3742

3843
Currently, hugetlbfs support is mutually exclusive with the following

docs/snapshotting/handling-page-faults-on-snapshot-resume.md

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -91,7 +91,8 @@ Firecracker and the page fault handler.
9191
![](../images/uffd_flow3.png)
9292

9393
- Firecracker passes the userfault file descriptor and the guest memory layout
94-
to the page fault handler process through the socket.
94+
(e.g. dimensions of each memory region, and their [page size](../hugepages.md)
95+
in KiB) to the page fault handler process through the socket.
9596

9697
![](../images/uffd_flow4.png)
9798

@@ -106,7 +107,7 @@ Firecracker and the page fault handler.
106107
happens, the page fault handler issues `UFFDIO_COPY` to load the previously
107108
mmaped file contents into the correspondent memory region.
108109

109-
After Firecracker sends the payload (i.e mem mappings and file descriptor), no
110+
After Firecracker sends the payload (i.e. mem mappings and file descriptor), no
110111
other communication happens on the UDS socket (or otherwise) between Firecracker
111112
and the page fault handler process.
112113

0 commit comments

Comments
 (0)