firecracker
firecracker copied to clipboard
Less memory checks in the queue
Changes
Replace accesses to the queue objects reside in the guest memory from always using GuestMemoryMmap to storing pointers to them directly. The reason we can do this is that these objects do not move in the guest memory, so storing direct pointers to them is safe.
Reason
This optimization avoid many memory check when accessing guest memory and thus can improves performance of all virtio devices.
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
- [ ] If a specific issue led to this PR, this PR closes the issue.
- [ ] The description of changes is clear and encompassing.
- [ ] Any required documentation changes (code and docs) are included in this PR.
- [ ] API changes follow the Runbook for Firecracker API changes.
- [ ] User-facing changes are mentioned in
CHANGELOG.md. - [ ] All added/changed functionality is tested.
- [ ] New
TODOs link to an issue. - [ ] Commits meet contribution quality standards.
- [ ] This functionality cannot be added in
rust-vmm.