-
Notifications
You must be signed in to change notification settings - Fork 5.1k
Making sure we have at least one region per gen during plan phase #83076
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
Conversation
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Tagging subscribers to this area: @dotnet/gc Issue Detailsnull
|
401d828
to
82c114c
Compare
Currently we can get into the situation that we didn't have at least one region in each generation we need to plan. And most of the time we are getting away with it because we can just get a new region in thread_final_regions. But if we can't, it's a functional problem because we will not maintain our at least one region per generation invariant. This change keeps how many regions are planned in each generation and if needed we will attempt to get new regions during plan phase. And if we can't we will go into the special sweep mode. When we demote regions with only pinned surv, we detect the ones with no surv at all - those can be freely planned into any generation we need. We could actually plan regions with only pinned surv to any generation, eg, we could promote a gen0 region to gen2. However it means we'd need to set cards on those pinned objects because we will not have a chance later. The benefit of doing this is small in general as when we get into process_remaining_regions, it's rare we don't already have planned regions in higher generations. So I don't think it's worth the complexicity for now. We may consider it for the future.
82c114c
to
167966f
Compare
PeterSolMS
reviewed
Apr 13, 2023
/azp run runtime-coreclr outerloop |
Azure Pipelines successfully started running 1 pipeline(s). |
PeterSolMS
reviewed
Apr 18, 2023
PeterSolMS
reviewed
Apr 18, 2023
PeterSolMS
approved these changes
Apr 18, 2023
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looks good to me.
Sign up for free
to subscribe to this conversation on GitHub.
Already have an account?
Sign in.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Currently we can get into the situation that we didn't have at least one region in each generation we
need to plan. And most of the time we are getting away with it because we can just get a new region
in thread_final_regions. But if we can't, it's a functional problem because we will not maintain our
at least one region per generation invariant.
This change keeps how many regions are planned in each generation and if needed we will attempt to get
new regions during plan phase. And if we can't we will go into the special sweep mode.
When we demote regions with only pinned surv, we detect the ones with no surv at all - those can be
freely planned into any generation we need. We could actually plan regions with only pinned surv to
any generation, eg, we could promote a gen0 region to gen2. However it means we'd need to set cards
on those pinned objects because we will not have a chance later. The benefit of doing this is small
in general as when we get into process_remaining_regions, it's rare we don't already have planned regions
in higher generations. So I don't think it's worth the complexicity for now. We may consider it for the future.