Skip to content

[release/9.0-staging] improve distribute_free_regions - #115167

Merged
mangod9 merged 4 commits into
release/9.0-stagingfrom
cp-freelist-9-staging
May 6, 2025
Merged

[release/9.0-staging] improve distribute_free_regions #115167
mangod9 merged 4 commits into
release/9.0-stagingfrom
cp-freelist-9-staging

Conversation

@mangod9

@mangod9mangod9 commented Apr 29, 2025

Copy link
Copy Markdown
Member

Port change for better free-list management. This is a back port of #109431

Customer Impact

  • Customer reported
  • Found internally

Memory utilization regression as part of Regions Enablement. Reported by a customer here: #103582.
The fix is to improve distribute_free_regions where aged regions are added to decommit list to ultimately free.

Regression

  • Yes
  • No

Yes in memory utilization. For certain customers who were running with dense containers they would observe an OOM occasionally.

Testing

Verified with internal performance testing. Provided a private to the customer to try out and they confirmed their memory utilization improved after the fix.

Risk

Low, this only impacts how free regions are deallocated.

CopilotAI review requested due to automatic review settings April 29, 2025 23:02
@ghostghost added the area-GC-coreclr label Apr 29, 2025
@mangod9
mangod9 requested a review from Maoni0April 29, 2025 23:02

CopilotAI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Pull Request Overview

This PR backports changes to improve free-list management in the garbage collector. The key changes include updating the free_region_kind enum to better distinguish region types, adding new free-list management methods to gc_heap, and introducing separate age thresholds for basic, large, and huge regions.

Comment threadsrc/coreclr/gc/gcpriv.h
Comment threadsrc/coreclr/gc/gcpriv.h
@dotnet-policy-service

Copy link
Copy Markdown
Contributor

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

@Maoni0Maoni0 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!

@jeffschwMSFTjeffschwMSFT 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. we will take for consideration in 9.0.x

@jeffschwMSFTjeffschwMSFT added the Servicing-consider Issue for next servicing release review label May 1, 2025
@jeffschwMSFTjeffschwMSFT added this to the 9.0.x milestone May 1, 2025
@jeffschwMSFTjeffschwMSFT changed the title backport free-list change to release/9.0-staging[release/9.0-staging] improve distribute_free_regions May 6, 2025
@rbhandarbhanda modified the milestones: 9.0.x, 9.0.6May 6, 2025
@rbhandarbhanda added Servicing-approved Approved for servicing release and removed Servicing-consider Issue for next servicing release review labels May 6, 2025
@mangod9
mangod9 merged commit af20fd0 into release/9.0-stagingMay 6, 2025
@mangod9
mangod9 deleted the cp-freelist-9-staging branch May 6, 2025 20:02
@github-actionsgithub-actionsBot locked and limited conversation to collaborators Jun 6, 2025
Sign up for freeto subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

area-GC-coreclrServicing-approvedApproved for servicing release

Projects

None yet

Development

Successfully merging this pull request may close these issues.

6 participants

@mangod9@jeffschwMSFT@Maoni0@rbhanda@markples