-
Notifications
You must be signed in to change notification settings - Fork 1.8k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Have Firecracker tell UFFD handler about page size during initial handshake #4449
Have Firecracker tell UFFD handler about page size during initial handshake #4449
Conversation
Codecov ReportAttention:
Additional details and impacted files@@ Coverage Diff @@
## main #4449 +/- ##
==========================================
+ Coverage 81.37% 81.56% +0.18%
==========================================
Files 243 243
Lines 29518 29542 +24
==========================================
+ Hits 24021 24095 +74
+ Misses 5497 5447 -50
Flags with carried forward coverage won't be shown. Click here to find out more. ☔ View full report in Codecov by Sentry. |
0cd73ad
to
deae98a
Compare
e50a9c0
to
94a2caa
Compare
94a2caa
to
a792bd1
Compare
When using a page-size agnostic UFFD handler, orchestration becomes easier if Firecracker tells the UFFD handler about page size (instead of some orchestrator having to tell both Firecracker and the UFFD handler about the page size independently). Thus, send along the page size in the initial payload that Firecracker sends to the UFFD handler (e.g. the one also containing information about the memory regions). We send the page size information for each region (even though Firecracker does not support per-region configuration of huge pages) for backward compatibility reasons (changing the top-level json object from a list of region to a dictionary would be a breaking change, but adding a field to each list entry is not). Signed-off-by: Patrick Roy <roypat@amazon.co.uk>
Document the new part of the initial handshake where Firecracker tells the UFFD handler about page size in KiB. Signed-off-by: Patrick Roy <roypat@amazon.co.uk>
Have the examples and tests utilize the page size information that Firecracker sends as part of the initial UFFD payload. This allows us to get rid of the separate uffd handler examples for the 4K and 2M test cases. Signed-off-by: Patrick Roy <roypat@amazon.co.uk>
Factor out the parts of the function that do not require holding a valid UFFD object into their own functions for which we can then write unittests. Also write the unittests. Signed-off-by: Patrick Roy <roypat@amazon.co.uk>
e3b1ee6
to
395bbaf
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM, we agreed to run a little bit of the tests manually to make sure https://buildkite.com/firecracker/firecracker-pr/builds/9088#018dac2d-4b95-4b19-a327-a59ddee918e2 is a spurious failure not caused by the content of the PR.
We managed to reproduce this intermittent failure on the |
This will make orchestration easier, as the whatever spawns the Firecracker and UFFD handler processes now does not have to ensure both get the passed the same hugepages configuration (and it also simplifies our testing setup)
License Acceptance
By submitting this pull request, I confirm that my contribution is made under
the terms of the Apache 2.0 license. For more information on following Developer
Certificate of Origin and signing off your commits, please check
CONTRIBUTING.md
.PR Checklist
PR.
CHANGELOG.md
.TODO
s link to an issue.contribution quality standards.
rust-vmm
.