Skip to content

fix: rename page_size_kib to page_size #4948

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

Merged
merged 2 commits into from
Mar 19, 2025

Conversation

acsmyth
Copy link
Contributor

@acsmyth acsmyth commented Dec 6, 2024

Changes

  • update page_size_kib name to the more accurate page_size, since it's actually in bytes, not KiB.
    ...

We leave the old page_size_kib field in there, but mark it as deprecated to avoid any Firecracker code from accidentally using it (and update everything on the Firecracker side to be called page_size instead of page_size_kib). This way we're backward compatible (and can remove the wrongly named field in 2.0), but have correctly named variables in the code base at least.
...

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

  • I have read and understand CONTRIBUTING.md.
  • I have run tools/devtool checkstyle to verify that the PR passes the
    automated style checks.
  • I have described what is done in these changes, why they are needed, and
    how they are solving the problem in a clear and encompassing way.
  • I have updated any relevant documentation (both in code and in the docs)
    in the PR.
  • I have mentioned all user-facing changes in CHANGELOG.md.
  • If a specific issue led to this PR, this PR closes the issue.
  • When making API changes, I have followed the
    Runbook for Firecracker API changes.
  • I have tested all new and changed functionalities in unit tests and/or
    integration tests.
  • I have linked an issue to every new TODO.

  • This functionality cannot be added in rust-vmm.

Copy link

codecov bot commented Dec 9, 2024

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 83.14%. Comparing base (70d6e7f) to head (8715c43).
Report is 1 commits behind head on main.

Additional details and impacted files
@@           Coverage Diff           @@
##             main    #4948   +/-   ##
=======================================
  Coverage   83.14%   83.14%           
=======================================
  Files         248      248           
  Lines       26923    26925    +2     
=======================================
+ Hits        22386    22388    +2     
  Misses       4537     4537           
Flag Coverage Δ
5.10-c5n.metal 83.53% <100.00%> (+<0.01%) ⬆️
5.10-m5n.metal 83.51% <100.00%> (+<0.01%) ⬆️
5.10-m6a.metal 82.71% <100.00%> (+<0.01%) ⬆️
5.10-m6g.metal 79.57% <100.00%> (+<0.01%) ⬆️
5.10-m6i.metal 83.52% <100.00%> (+0.01%) ⬆️
5.10-m7a.metal-48xl 82.71% <100.00%> (?)
5.10-m7g.metal 79.57% <100.00%> (+<0.01%) ⬆️
6.1-c5n.metal 83.58% <100.00%> (+<0.01%) ⬆️
6.1-m5n.metal 83.57% <100.00%> (+<0.01%) ⬆️
6.1-m6a.metal 82.75% <100.00%> (+<0.01%) ⬆️
6.1-m6g.metal 79.57% <100.00%> (+0.01%) ⬆️
6.1-m6i.metal 83.55% <100.00%> (+<0.01%) ⬆️
6.1-m7a.metal-48xl 82.75% <100.00%> (?)
6.1-m7g.metal 79.57% <100.00%> (+<0.01%) ⬆️

Flags with carried forward coverage won't be shown. Click here to find out more.

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

@roypat
Copy link
Contributor

roypat commented Dec 13, 2024

Hi @acsmyth,
thanks for catching this! The team's discussed this, and we agreed that although huge pages support is somewhat new, this would still be a breaking change, and so there should be some sort of transition period for users of Firecracker. So for that reason, I think we should just carry two fields for a while (e.g. both page_size and page_size_kib with the broken semantics). That being said, I think most of your PR can go through unchanged, we'll only need to readd page_size_kib to GuestRegionUffdMapping and set it to the same value as page_size in create_guest_memory. We'd also need to add something to DEPRECATED.md warning that we'll remove page_size_kib in an upcoming version.

@roypat roypat marked this pull request as ready for review March 17, 2025 15:16
@roypat roypat added the Status: Awaiting review Indicates that a pull request is ready to be reviewed label Mar 17, 2025
pb8o
pb8o previously approved these changes Mar 17, 2025
Keep around the old page_size_kib field, but add a deprecation notice.

Signed-off-by: acsmyth <[email protected]>
Co-authored-by: Patrick Roy <[email protected]>
Signed-off-by: Patrick Roy <[email protected]>
@roypat roypat enabled auto-merge (rebase) March 19, 2025 14:51
@roypat roypat merged commit 07c07bd into firecracker-microvm:main Mar 19, 2025
6 of 7 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Status: Awaiting review Indicates that a pull request is ready to be reviewed
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants