-
Notifications
You must be signed in to change notification settings - Fork 236
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
Don't refcount Process #2601
Don't refcount Process #2601
Conversation
0e13d8f
to
1fba9d1
Compare
Codecov ReportBase: 67.00% // Head: 68.11% // Increases project coverage by
Additional details and impacted files@@ Coverage Diff @@
## main #2601 +/- ##
==========================================
+ Coverage 67.00% 68.11% +1.11%
==========================================
Files 197 198 +1
Lines 29182 29125 -57
Branches 5740 5737 -3
==========================================
+ Hits 19553 19839 +286
+ Misses 5085 4698 -387
- Partials 4544 4588 +44
Flags with carried forward coverage won't be shown. Click here to find out more.
Help us with your feedback. Take ten seconds to tell us how you rate us. Have a feature suggestion? Share it here. ☔ View full report at Codecov. |
Looks like there may be a very small performance penalty, but it's pretty much in the noise. tgen: https://github.com/shadow/benchmark-results/blob/master/tgen/2022-12-12-T12-31-16/plots/shadow.results.pdf If there is a performance penalty vs using weak references, it should go away as code gets migrated to Rust, where I expect we'll still use them. |
This no longer results in a crash in the small_stop_time-shadow test, since the process start task no longer manipulates the Process reference count. Fixes shadow#2514
Also add a test to validate behavior when a process exits while a timer is still set. This passes, since the itimer uses a wrapper task that already detects when the timer no longer exists, so doesn't call _process_itimer_real_expiration.
1fba9d1
to
1a131d3
Compare
This simplifies the migration of Process to Rust.
I had initially planned to used
RootedRc
, and to storeRootedRcWeak
in tasks and to avoid circular references, but I realized the only strong reference would currently be in theHost
. It'll be simpler to avoid exposing theRootedRc
andRootedRcWeak
wrappers aroundProcess
to the C code, and this allows us to do it.This adds some
BTreeTable
lookups to fetchProcess*
's from theHost
's process table, but these should be quite fast, especially since most simulations use fairly few processes per host. I'll do a benchmark run to verify, though.