Skip to content

Conversation

@serban300
Copy link
Contributor

@serban300 serban300 commented Nov 20, 2020

Reason for This PR

increase the number of IRQs on x86_64

Description of Changes

increase the number of IRQs on x86_64

  • This functionality can be added in rust-vmm.

License Acceptance

By submitting this pull request, I confirm that my contribution is made under
the terms of the Apache 2.0 license.

PR Checklist

[Author TODO: Meet these criteria.]
[Reviewer TODO: Verify that these criteria are met. Request changes if not]

  • All commits in this PR are signed (git commit -s).
  • The reason for this PR is clearly provided (issue no. or explanation).
  • The description of changes is clear and encompassing.
  • Any required documentation changes (code and docs) are included in this PR.
  • Any newly added unsafe code is properly documented.
  • Any API changes are reflected in firecracker/swagger.yaml.
  • Any user-facing changes are mentioned in CHANGELOG.md.
  • All added/changed functionality is tested.

@serban300 serban300 self-assigned this Nov 20, 2020
Copy link
Contributor

@luminitavoicu luminitavoicu left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM. I only have a couple of nits:

Copy link

@iulianbarbu iulianbarbu left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

We should also add a test were we attach devices up to 24 and over 24, checking at the same time if the uVM devices are operational.

iulianbarbu
iulianbarbu previously approved these changes Nov 20, 2020
@iulianbarbu iulianbarbu dismissed their stale review November 20, 2020 08:53

@luminitavoicu will push tests to this PR. Will wait for them.

@serban300 serban300 force-pushed the IRQs branch 2 times, most recently from db34adc to 7706583 Compare November 20, 2020 09:08
@sandreim
Copy link
Contributor

When using more than 16 irqs we need to see if saved snapshots of microvms in v0.23 format can still be restored with Firecracker v0.23 which does not have these changes.

@serban300
Copy link
Contributor Author

When using more than 16 irqs we need to see if saved snapshots of microvms in v0.23 format can still be restored with Firecracker v0.23 which does not have these changes.

I checked and this doesn't work. As we discussed offline we shouldn't allow snapshotting for v0.23 from the versions that have this improvement.

@luminitavoicu
Copy link
Contributor

luminitavoicu commented Nov 25, 2020

I added integration tests for the two scenarios mentioned above by @iulianbarbu.
I'll draft this PR until #2301 is merged. The tests will not pass without this fix.

Copy link
Contributor

@acatangiu acatangiu left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Fix and test look good.

What about the snapshot sanity check where we don't allow creating older version snapshots when we have many devices? Do we add that with this PR? Or is it planned for a subsequent PR (needs high prio issue if that's the case)?

@luminitavoicu
Copy link
Contributor

Fix and test look good.

What about the snapshot sanity check where we don't allow creating older version snapshots when we have many devices? Do we add that with this PR? Or is it planned for a subsequent PR (needs high prio issue if that's the case)?

The snapshot check is still in progress. I was planning on adding that commit to this PR when it's ready.

@luminitavoicu luminitavoicu force-pushed the IRQs branch 3 times, most recently from 1eb4eaa to 188f531 Compare November 26, 2020 15:45
@luminitavoicu luminitavoicu force-pushed the IRQs branch 2 times, most recently from 662d56f to 36e37c5 Compare November 27, 2020 09:07
@luminitavoicu luminitavoicu force-pushed the IRQs branch 3 times, most recently from 32ddc46 to 9c4d6fc Compare November 27, 2020 11:07
@luminitavoicu luminitavoicu added the Status: Awaiting review Indicates that a pull request is ready to be reviewed label Nov 27, 2020
acatangiu
acatangiu previously approved these changes Nov 27, 2020
acatangiu
acatangiu previously approved these changes Nov 27, 2020
Serban Iorga and others added 2 commits November 27, 2020 16:00
Signed-off-by: Serban Iorga <seriorga@amazon.com>
Added tests to cover two scenarios:
- after attaching the maximum number of supported devices (that is 19
since the IRQ lines range from 5 to 23), they are still operational;
- atempting to boot a microVM which has more than 19 devices attached
fails with the expected error.

Signed-off-by: Luminita Voicu <lumivo@amazon.com>
Firecracker v0.24 now supports 24 IRQ lines, so it accepts more
devices to be attached. Creating a snapshot with a previous version
(for example: `v0.23.0`) is only allowed if the number of devices
added is consistent to the maximum supported by the requested version.
Otherwise, snapshotting will fail with a dedicated error.
Integration tests were added to validate the snapshot sanity check.

Signed-off-by: Luminita Voicu <lumivo@amazon.com>
Comment on lines +353 to +359
fn validate_devices_number(device_number: usize) -> std::result::Result<(), CreateSnapshotError> {
use self::CreateSnapshotError::TooManyDevices;
if device_number > FC_V0_23_MAX_DEVICES as usize {
return Err(TooManyDevices(device_number));
}
Ok(())
}
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

nit: this is function is specific to v0.23-only, it've better been hardcoded in the version match or at least it should have v023 in its name.

@acatangiu acatangiu merged commit 8101086 into firecracker-microvm:master Dec 2, 2020
@serban300 serban300 deleted the IRQs branch May 10, 2021 07:22
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.

Enable IRQ sharing to remove the current limit of 11 devices per microVM

6 participants