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

Linux: Add vCPU kicking, exit vCPU threads gracefully #165

Merged
merged 4 commits into from
Aug 30, 2021

Conversation

mkroening
Copy link
Member

No description provided.

@codecov
Copy link

codecov bot commented Aug 25, 2021

Codecov Report

Merging #165 (a357cd1) into master (495d3ff) will decrease coverage by 0.26%.
The diff coverage is 0.00%.

Impacted file tree graph

@@            Coverage Diff             @@
##           master     #165      +/-   ##
==========================================
- Coverage   31.02%   30.76%   -0.27%     
==========================================
  Files          15       16       +1     
  Lines        3993     4017      +24     
==========================================
- Hits         1239     1236       -3     
- Misses       2754     2781      +27     
Impacted Files Coverage Δ
src/lib.rs 10.82% <ø> (+2.07%) ⬆️
src/linux/mod.rs 0.00% <0.00%> (ø)
src/linux/vcpu.rs 0.00% <0.00%> (ø)
src/vm.rs 28.35% <ø> (ø)
src/linux/gdb.rs 0.00% <0.00%> (ø)
src/gdb_parser.rs 64.62% <0.00%> (+0.01%) ⬆️
src/linux/uhyve.rs 53.77% <0.00%> (+1.00%) ⬆️

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update 495d3ff...a357cd1. Read the comment docs.

@mkroening mkroening force-pushed the graceful-threads branch 3 times, most recently from 8795100 to cc26cca Compare August 25, 2021 16:26
@mkroening mkroening marked this pull request as draft August 26, 2021 08:13
@mkroening mkroening changed the title [WIP] Exit threads gracefully Linux: Add vCPU kicking, exit vCPU threads gracefully Aug 26, 2021
@mkroening mkroening marked this pull request as ready for review August 26, 2021 10:02
Cargo.toml Show resolved Hide resolved
@jounathaen
Copy link
Member

That's a huge diff. Can you maybe shortly summarize what you have done?

This allows vCPUs to be kicked out of execution externally. Kicked vCPUs
exit without code.
This copies the code without changes.
@mkroening
Copy link
Member Author

mkroening commented Aug 26, 2021

I split the PR into four commits. Hopefully that makes the changes clearer.

The diff in src/linux/vcpu.rs looks much bigger than it is. It is mostly an indentation change, as we check Err to be libc::EINTR now.

@jounathaen
Copy link
Member

LGTM, except a few more comments would help this code! Thank you for the work!

@jounathaen
Copy link
Member

bors r+

@bors bors bot merged commit 97fc2ce into hermit-os:master Aug 30, 2021
@mkroening mkroening deleted the graceful-threads branch August 30, 2021 11:49
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants