Skip to content
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

skipped unnecessary kvm_immediate_exits #4388

Merged
merged 3 commits into from
Apr 2, 2024

Conversation

MatiasT
Copy link
Contributor

@MatiasT MatiasT commented Jan 19, 2024

Skipped context switches in the presence of run_emulation and VcpuEvent::Resume if kvm_immediate_exit is set

Changes

  • Forced kvm_immediate_exit to 0 in the presence of VcpuEvent::Resume, we are resuming the VM, we don't want to kick the vm out of the cpu during this process
  • Skipped the context switches in the case of run_emulation if `kvm_immediate_exit is set

Reason

...

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.

Copy link

codecov bot commented Jan 19, 2024

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 82.02%. Comparing base (180f5df) to head (1f899b0).

Additional details and impacted files
@@           Coverage Diff           @@
##             main    #4388   +/-   ##
=======================================
  Coverage   82.02%   82.02%           
=======================================
  Files         253      253           
  Lines       31035    31046   +11     
=======================================
+ Hits        25456    25467   +11     
  Misses       5579     5579           
Flag Coverage Δ
4.14-c5n.metal 79.49% <100.00%> (+<0.01%) ⬆️
4.14-c7g.metal ?
4.14-m5n.metal 79.48% <91.66%> (+<0.01%) ⬆️
4.14-m6a.metal 78.69% <100.00%> (+<0.01%) ⬆️
4.14-m6g.metal 76.67% <100.00%> (+<0.01%) ⬆️
4.14-m6i.metal 79.47% <91.66%> (+<0.01%) ⬆️
4.14-m7g.metal 76.67% <100.00%> (?)
5.10-c5n.metal 82.03% <100.00%> (+<0.01%) ⬆️
5.10-c7g.metal ?
5.10-m5n.metal 82.01% <91.66%> (+<0.01%) ⬆️
5.10-m6a.metal 81.31% <91.66%> (+<0.01%) ⬆️
5.10-m6g.metal ?
5.10-m6i.metal 82.01% <91.66%> (+<0.01%) ⬆️
5.10-m7g.metal 79.44% <100.00%> (?)
6.1-c5n.metal 82.03% <100.00%> (+<0.01%) ⬆️
6.1-m5n.metal 82.02% <100.00%> (+<0.01%) ⬆️
6.1-m6a.metal 81.31% <91.66%> (+<0.01%) ⬆️
6.1-m6g.metal 79.44% <100.00%> (+<0.01%) ⬆️
6.1-m6i.metal 82.01% <100.00%> (+<0.01%) ⬆️
6.1-m7g.metal 79.44% <100.00%> (?)

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.

@MatiasT MatiasT force-pushed the emulation_task branch 2 times, most recently from 050bca2 to 59cae55 Compare January 19, 2024 17:08
@MatiasT MatiasT force-pushed the emulation_task branch 2 times, most recently from f045a54 to a222eab Compare March 29, 2024 18:46
Skipped switches in the presence of run_emulation and VcpuEvent::Resume

Signed-off-by: Matias Teragni <mteragni@amazon.com>
@roypat roypat self-requested a review April 2, 2024 14:30
@roypat roypat added the Status: Awaiting review Indicates that a pull request is ready to be reviewed label Apr 2, 2024
@roypat roypat merged commit 32cfc5e into firecracker-microvm:main Apr 2, 2024
7 checks passed
Copy link

@amondirvin amondirvin left a comment

Choose a reason for hiding this comment

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

Alapproved

@@ -16,7 +16,7 @@ use std::{fmt, io, thread};
use kvm_bindings::{KVM_SYSTEM_EVENT_RESET, KVM_SYSTEM_EVENT_SHUTDOWN};
use kvm_ioctls::VcpuExit;
use libc::{c_int, c_void, siginfo_t};
use log::{error, info};
use log::{error, info, warn};

Choose a reason for hiding this comment

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

Apple pay

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.

4 participants