Added the fix to make use of the heap hard limit instead of the region range while using large pages.#68629
Added the fix to make use of the heap hard limit instead of the region range while using large pages.#68629mrsharm wants to merge 1 commit intodotnet:mainfrom
Conversation
…n range while using the large pages
|
Tagging subscribers to this area: @dotnet/gc Issue DetailsSummaryAddresses #54616 for which, if large pages are enabled, we are setting the
|
|
what kind of perf testing was done on this? I believe using the hardlimit is way too strict here and you will end up not being able to realistically allocate the hardlimit amount of memory. in segment cases we actually commit 2x the limit the user specifies for SOH and LOH because we cannot predict if objects will be large or small. with regions we certainly are working toward getting rid of this distinction but it would require some thoughts on what our policy should be. |
There was no perf testing / tuning done for this PR. I can work on this after discussing the policy here. |
|
This is starting to show up on our stale PR radar - what are the next steps to proceed here? |
|
@trylek - closing for now. Will re-open when we have a more concrete solution. |
|
Without my change, we are now committing 2 x the heap hard limit based on the gc_heap::regions_range = (size_t)GCConfig::GetGCRegionRange();
if (gc_heap::regions_range == 0)
{
if (gc_heap::heap_hard_limit)
{
gc_heap::regions_range = 2 * gc_heap::heap_hard_limit;
}
else
{
gc_heap::regions_range = max(((size_t)256 * 1024 * 1024 * 1024), (size_t)(2 * gc_heap::total_physical_mem));
}
gc_heap::regions_range = align_on_page(gc_heap::regions_range);
} |
Summary
If large pages are enabled, we set the
reserve_sizeof regions to be equivalent to that of the heap hard limit rather than the default range.