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

fix lower heap hard limit condition for regions #76407

Merged
merged 7 commits into from
Oct 4, 2022

Conversation

mangod9
Copy link
Member

@mangod9 mangod9 commented Sep 29, 2022

Fixes #76199, where containers < 512mb were failing with E_OOM during GC initialization, since the check for region_size * heaps * 19 (various generations) < reservation size was failing.

The logic is to now dynamically adjust region_size for smaller heap sizes. So for very small heap_hard_limits the region_size would be 1mb (instead of the default 4mb currently)

@ghost
Copy link

ghost commented Sep 29, 2022

Tagging subscribers to this area: @dotnet/gc
See info in area-owners.md if you want to be subscribed.

Issue Details

Fixes #76199, where containers < 512mb were failing with E_OOM during GC initialization, since the check for region_size * heaps * 19 (various generations) < reservation size was failing

Author: mangod9
Assignees: -
Labels:

area-GC-coreclr

Milestone: -

@mangod9
Copy link
Member Author

mangod9 commented Sep 30, 2022

with the latest change, the lowest hard_limit possible is 0x400000 (4mb)

src/coreclr/gc/gc.cpp Outdated Show resolved Hide resolved
src/coreclr/gc/gc.cpp Outdated Show resolved Hide resolved
Copy link
Member

@Maoni0 Maoni0 left a comment

Choose a reason for hiding this comment

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

other than the nit above, it LGTM

@mangod9
Copy link
Member Author

mangod9 commented Oct 4, 2022

The Hardware Instrinsics failure looks related to: #76280. Other PRs are failing with that same failure. Need to port to 7 hence merging.

@mangod9 mangod9 merged commit 4ca326f into dotnet:main Oct 4, 2022
@mangod9
Copy link
Member Author

mangod9 commented Oct 4, 2022

/backport to release/7.0

@github-actions
Copy link
Contributor

github-actions bot commented Oct 4, 2022

Started backporting to release/7.0: https://github.com/dotnet/runtime/actions/runs/3179565569

@mangod9 mangod9 deleted the update_reserve_size branch October 4, 2022 17:41
@ghost ghost locked as resolved and limited conversation to collaborators Nov 3, 2022
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

.NET 7.0.100-preview.7.22377.5 threw an exception in docker (with memory limit but unbounded cpu)
2 participants