Skip to content

Make sure separated_poh_p and use_large_pages_p works together - #50665

Merged
cshung merged 2 commits into
dotnet:mainfrom
cshung:public/fix-separate-poh
Apr 9, 2021
Merged

Make sure separated_poh_p and use_large_pages_p works together#50665
cshung merged 2 commits into
dotnet:mainfrom
cshung:public/fix-separate-poh

Conversation

@cshung

@cshung cshung commented Apr 2, 2021

Copy link
Copy Markdown
Contributor

This fixes 3 issues in the area:

  1. If we decided to give some memory to POH even when it is set to 0, we should adjust the corresponding heap_hard_limit and heap_hard_limit_oh to avoid failing the virtual_commit call. The virtual_commit call consumes the heap_hard_limit regardless of whether or not the memory is actually committed.

  2. In the large page case, if we decided to allocate the POH part of the memory using normal pages, then we need to commit them as well because the rest of the system assumes all the memory of large page cases is committed upfront.

  3. virtual_free could be called by reserve_initial_memory if the memory operations fail, therefore it could be called in the heap_hard_limit case as well, removing the erroneous assert in that case.

@ghost ghost added the area-GC-coreclr label Apr 2, 2021
@ghost

ghost commented Apr 2, 2021

Copy link
Copy Markdown

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

Issue Details
Author: cshung
Assignees: -
Labels:

area-GC-coreclr

Milestone: -

@ghost

ghost commented Apr 2, 2021

Copy link
Copy Markdown

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

Issue Details
Author: cshung
Assignees: -
Labels:

area-GC-coreclr

Milestone: -

Comment thread src/coreclr/gc/gc.cpp Outdated
Comment thread src/coreclr/gc/gc.cpp Outdated
Comment thread src/coreclr/gc/gc.cpp Outdated
@cshung
cshung force-pushed the public/fix-separate-poh branch from f6eaec2 to b643074 Compare April 5, 2021 23:58

@Maoni0 Maoni0 left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

LGTM!

@cshung
cshung merged commit 9052843 into dotnet:main Apr 9, 2021
@cshung
cshung deleted the public/fix-separate-poh branch April 9, 2021 17:43
@ghost ghost locked as resolved and limited conversation to collaborators May 9, 2021
@karelz karelz added this to the 6.0.0 milestone May 20, 2021
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.

4 participants